[Bug 509527] New: gdb report incorrect address for argc after malloc call
http://bugzilla.novell.com/show_bug.cgi?id=509527 Summary: gdb report incorrect address for argc after malloc call Classification: openSUSE Product: openSUSE 11.0 Version: Final Platform: 32bit OS/Version: openSUSE 11.0 Status: NEW Severity: Major Priority: P5 - None Component: Development AssignedTo: pth@novell.com ReportedBy: roberto.bernetti@poste.it QAContact: qa@suse.de Found By: --- User-Agent: Mozilla/5.0 (X11; U; Linux i686; it; rv:1.9.0.10) Gecko/2009042700 SUSE/3.0.10-1.1 Firefox/3.0.10 after an call to "malloc" gdb start to report incorrect call stack Reproducible: Always Steps to Reproduce: 1. this is the example code: #include <stdlib.h> #include <string.h> #include <stdio.h> void init() { char *ptr; ptr = (char *) malloc (2); } int main (int argc, char *argv[]) { int i; char *progname; i=argc; progname = argv[0]; init(); return 0; } 2. Compiling with this command: gcc -o memtest memtest.c -ggdb3 3. run the program using gdb Actual Results: (gdb) s init () at x.c:7 7 ptr = malloc (2); (gdb) where #0 init () at x.c:7 #1 0x0804845e in main (argc=1, argv=0xbffff694) at x.c:15 (gdb) s 8 } (gdb) where #0 init () at x.c:8 #1 0x0804845e in main (argc=0, argv=0x20ff1) at x.c:15 (gdb) s main (argc=0, argv=0x20ff1) at x.c:16 16 return 0; (gdb) where #0 main (argc=0, argv=0x20ff1) at x.c:16 (gdb) q The program is running. Quit anyway (and kill it)? (y or n) y -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=509527 Philipp Thomas <pth@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |pth@novell.com AssignedTo|pth@novell.com |matz@novell.com -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=509527 User rguenther@novell.com added comment http://bugzilla.novell.com/show_bug.cgi?id=509527#c1 --- Comment #1 from Richard Guenther <rguenther@novell.com> 2009-06-03 09:37:55 MDT --- Confirmed. Still happens with archer + gcc 4.3 on x86_64 with -m32. Fixed with archer + gcc 4.4. -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=509527 User roberto.bernetti@poste.it added comment http://bugzilla.novell.com/show_bug.cgi?id=509527#c2 --- Comment #2 from Roberto Bernetti <roberto.bernetti@poste.it> 2009-06-03 13:08:10 MDT --- on the following opensuse forum: http://forums.opensuse.org/programming-scripting/415438-argc-cannot-access-m... there is a user of x86_64bit architecture that report no problem -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=509527 https://bugzilla.novell.com/show_bug.cgi?id=509527#c3 Michael Matz <matz@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED --- Comment #3 from Michael Matz <matz@novell.com> 2011-05-30 15:37:18 UTC --- Fixed in 11.3 at least. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com