[valgrind] [Bug 371966] No uninitialised values reported with PGI -Mstack_arrays

2016-12-01 Thread Carl Ponder
https://bugs.kde.org/show_bug.cgi?id=371966 --- Comment #24 from Carl Ponder --- I can upload an executable, or I can give you the source-code for the test and instructions on how to build and run it. You'd still need to have the PGI runtime installed. I can help you get a demo copy if you need.

[valgrind] [Bug 371966] No uninitialised values reported with PGI -Mstack_arrays

2016-11-30 Thread Julian Seward
https://bugs.kde.org/show_bug.cgi?id=371966 --- Comment #23 from Julian Seward --- (In reply to Carl Ponder from comment #22) > I know they're not zeroing out the space. That doesn't sync with my understanding of the discussion above. I think your chances of getting a definitive answer are low

[valgrind] [Bug 371966] No uninitialised values reported with PGI -Mstack_arrays

2016-11-30 Thread Carl Ponder
https://bugs.kde.org/show_bug.cgi?id=371966 --- Comment #22 from Carl Ponder --- I know they're not zeroing out the space. As far as trying to intercept the subroutine-call, I've worked a little on this level coregrind/m_syswrap but these only intercept system-calls, right? And you're say

[valgrind] [Bug 371966] No uninitialised values reported with PGI -Mstack_arrays

2016-11-30 Thread Julian Seward
https://bugs.kde.org/show_bug.cgi?id=371966 --- Comment #21 from Julian Seward --- (In reply to Tom Hughes from comment #19) My assumption about what __builtin_aa does is: it moves RSP down by the specified amount, zeroes out the new area, and then returns. Except .. how does it return? It must

[valgrind] [Bug 371966] No uninitialised values reported with PGI -Mstack_arrays

2016-11-30 Thread Tom Hughes
https://bugs.kde.org/show_bug.cgi?id=371966 --- Comment #20 from Tom Hughes --- Actually given that the return from the call will unwind the stack again that means the caller will be accessing values below the stack pointer which is unsafe if a signal fires as the signal may trash the stack below

[valgrind] [Bug 371966] No uninitialised values reported with PGI -Mstack_arrays

2016-11-30 Thread Tom Hughes
https://bugs.kde.org/show_bug.cgi?id=371966 Tom Hughes changed: What|Removed |Added CC||t...@compton.nu --- Comment #19 from Tom Hughes -

[valgrind] [Bug 371966] No uninitialised values reported with PGI -Mstack_arrays

2016-11-30 Thread Carl Ponder
https://bugs.kde.org/show_bug.cgi?id=371966 --- Comment #18 from Carl Ponder --- PGI confirms that this call to "__builtin_aa" is what's bumping the stack pointer. It's a subroutine inside the PGI runtime. Does valgrind have a way for us to intercept this subroutine-call and then mark the array-

[valgrind] [Bug 371966] No uninitialised values reported with PGI -Mstack_arrays

2016-11-23 Thread Carl Ponder
https://bugs.kde.org/show_bug.cgi?id=371966 --- Comment #17 from Carl Ponder --- I uploaded the two assembly-files. From the "sdiff", I think this is where the allocations vary: -Mnostack_arrays -Mstack_arrays

[valgrind] [Bug 371966] No uninitialised values reported with PGI -Mstack_arrays

2016-11-23 Thread Carl Ponder
https://bugs.kde.org/show_bug.cgi?id=371966 --- Comment #16 from Carl Ponder --- Created attachment 102409 --> https://bugs.kde.org/attachment.cgi?id=102409&action=edit Assembly generated with stack arrays, where valgrind doesn't work -- You are receiving this mail because: You are watching a

[valgrind] [Bug 371966] No uninitialised values reported with PGI -Mstack_arrays

2016-11-23 Thread Carl Ponder
https://bugs.kde.org/show_bug.cgi?id=371966 --- Comment #15 from Carl Ponder --- Created attachment 102408 --> https://bugs.kde.org/attachment.cgi?id=102408&action=edit Assembly generated without stack-arrays, where valgrind works -- You are receiving this mail because: You are watching all b

[valgrind] [Bug 371966] No uninitialised values reported with PGI -Mstack_arrays

2016-11-22 Thread Philippe Waroquiers
https://bugs.kde.org/show_bug.cgi?id=371966 --- Comment #14 from Philippe Waroquiers --- (In reply to Carl Ponder from comment #13) > Given that there's junk in the array, I know that the contents aren't being > zero'd out, and the PGI people confirm that -Mstack_arrays are not > initialized. How

[valgrind] [Bug 371966] No uninitialised values reported with PGI -Mstack_arrays

2016-11-22 Thread Carl Ponder
https://bugs.kde.org/show_bug.cgi?id=371966 --- Comment #13 from Carl Ponder --- Given that there's junk in the array, I know that the contents aren't being zero'd out, and the PGI people confirm that -Mstack_arrays are not initialized. How does valgrind recognize that an array is being initializ

[valgrind] [Bug 371966] No uninitialised values reported with PGI -Mstack_arrays

2016-11-22 Thread Julian Seward
https://bugs.kde.org/show_bug.cgi?id=371966 --- Comment #12 from Julian Seward --- Probably your least-worst option at this point is to compile the test program in the configuration where the errors are not reported, and hope that it all gets compiled into a single function (which it looks like i

[valgrind] [Bug 371966] No uninitialised values reported with PGI -Mstack_arrays

2016-11-22 Thread Carl Ponder
https://bugs.kde.org/show_bug.cgi?id=371966 --- Comment #11 from Carl Ponder --- Back to comment #9, there *is* no instruction initializing the array, which is why it has some junk entries, regardless of valgirind's lack of mention. Talking to the PGI people, the -Mxtack_arrays flag causes the l

[valgrind] [Bug 371966] No uninitialised values reported with PGI -Mstack_arrays

2016-11-03 Thread Carl Ponder
https://bugs.kde.org/show_bug.cgi?id=371966 --- Comment #10 from Carl Ponder --- Stopping at line 70 puts it right after the array-allocation but before the array-writes are happening: 62 implicit none 63 integer, intent(in) :: N 64 integer ( kind = 4 ) i 65 integer (

[valgrind] [Bug 371966] No uninitialised values reported with PGI -Mstack_arrays

2016-11-03 Thread Philippe Waroquiers
https://bugs.kde.org/show_bug.cgi?id=371966 --- Comment #9 from Philippe Waroquiers --- (In reply to Carl Ponder from comment #8) > If I *don't* compile with the -Mstack_arrays, I get this at line 77 instead: > > (gdb) print x > $1 = (0, 1, 2, 3, 4, 0, 0, 0, 0, 0) > (gdb) print &x > $2 = (PTR TO

[valgrind] [Bug 371966] No uninitialised values reported with PGI -Mstack_arrays

2016-11-03 Thread Carl Ponder
https://bugs.kde.org/show_bug.cgi?id=371966 --- Comment #8 from Carl Ponder --- If I *don't* compile with the -Mstack_arrays, I get this at line 77 instead: (gdb) print x $1 = (0, 1, 2, 3, 4, 0, 0, 0, 0, 0) (gdb) print &x $2 = (PTR TO -> ( integer (10))) 0x70881d0 (gdb) monitor xb 0x70881d0 40

[valgrind] [Bug 371966] No uninitialised values reported with PGI -Mstack_arrays

2016-11-03 Thread Carl Ponder
https://bugs.kde.org/show_bug.cgi?id=371966 --- Comment #7 from Carl Ponder --- Ok here's better -- I can see the data if I compile using "-O0 -g" rather than "-O0 -gopt", which I'd assumed would be the same thing. Here's what I'm seeing in the step-through: at line 77, the array contains

[valgrind] [Bug 371966] No uninitialised values reported with PGI -Mstack_arrays

2016-11-02 Thread Philippe Waroquiers
https://bugs.kde.org/show_bug.cgi?id=371966 --- Comment #6 from Philippe Waroquiers --- (In reply to Carl Ponder from comment #4) > Can you please list out the commands more precisely? > I ran these commands in one window: > > module purge > module load pgi/16.9 > module load g

[valgrind] [Bug 371966] No uninitialised values reported with PGI -Mstack_arrays

2016-11-02 Thread Philippe Waroquiers
https://bugs.kde.org/show_bug.cgi?id=371966 --- Comment #5 from Philippe Waroquiers --- (In reply to Carl Ponder from comment #3) > This "pgfortran" is the PGI Fortran compiler. > What I'm puzzled about is why valgrind is finding more uninitialized > array-elements when I compiled with gfortran t

[valgrind] [Bug 371966] No uninitialised values reported with PGI -Mstack_arrays

2016-11-02 Thread Carl Ponder
https://bugs.kde.org/show_bug.cgi?id=371966 --- Comment #4 from Carl Ponder --- Can you please list out the commands more precisely? I ran these commands in one window: module purge module load pgi/16.9 module load gcc/4.8.5 module load valgrind pgfortran -o test03

[valgrind] [Bug 371966] No uninitialised values reported with PGI -Mstack_arrays

2016-11-02 Thread Carl Ponder
https://bugs.kde.org/show_bug.cgi?id=371966 --- Comment #3 from Carl Ponder --- This "pgfortran" is the PGI Fortran compiler. What I'm puzzled about is why valgrind is finding more uninitialized array-elements when I compiled with gfortran than with pgfortran, and if I use pgfortran -O0 -gopt -M

[valgrind] [Bug 371966] No uninitialised values reported with PGI -Mstack_arrays

2016-11-02 Thread Philippe Waroquiers
https://bugs.kde.org/show_bug.cgi?id=371966 Philippe Waroquiers changed: What|Removed |Added CC||philippe.waroquiers@skynet.

[valgrind] [Bug 371966] No uninitialised values reported with PGI -Mstack_arrays

2016-11-02 Thread Carl Ponder
https://bugs.kde.org/show_bug.cgi?id=371966 --- Comment #1 from Carl Ponder --- I attached the test-case here. You can reproduce the issue as follows: pgfortran -o test03.pgi test03.f90 -O0 -gopt valgrind test03.pgi # 12 errors. pgfortran -o test03.pgi test03.f90 -O0 -gopt -