This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/21222] A function with a particular number of arguments corrupts a value calculated on the stack when stepping through the function


https://sourceware.org/bugzilla/show_bug.cgi?id=21222

Keith Seitz <keiths at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |keiths at redhat dot com

--- Comment #2 from Keith Seitz <keiths at redhat dot com> ---
(In reply to Adam Stylinski from comment #0)
> Created attachment 9872 [details]
> Minimal test case
> 
> Sorry for the convoluted summary, I'm not entirely sure how or why it
> happens.  The results are fine when not attached to the debugger (or in the
> test case I'm providing, not stepping into the function).  

It is not clear to me what you mean here. Does the attached test case
demonstrate the problem?

> I compiled with -O0 and -g3.  Put a break point in testFunc, step through
> with step or next, and you'll see a corrupted value.

I cannot reproduce this with HEAD or 7.12.1.20170306-git.

Is it possible that the compiler is re-using unused registers? "info frame",
"info addr", and "disass" should be helpful here to determine if this is the
happening.

Out of curiosity, what compiler are you using?

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]