This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug c++/21222] A function with a particular number of arguments corrupts a value calculated on the stack when stepping through the function
- From: "keiths at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Mon, 06 Mar 2017 21:09:24 +0000
- Subject: [Bug c++/21222] A function with a particular number of arguments corrupts a value calculated on the stack when stepping through the function
- Auto-submitted: auto-generated
- References: <bug-21222-4717@http.sourceware.org/bugzilla/>
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.