This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC 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]

Re: *** buffer overflow detected *** error


On Thu, Nov 27, 2008 at 4:06 AM, Andrew Haley <aph@redhat.com> wrote:
> ying lcs wrote:
>
>> I have a c++ application compiled using gcc. But i get this exception
>> when i execute it.
>> Can you please tell me how can I trouble-shoot it?
>
> Either
>
> a.  Run in gdb, and look at where the buffer overflow happens, or
> b.  Run under Valgrid's memcheck.
>
> Andrew.
>
>
Thanks. But it appears it crashes inside libc?
And when I compile the same code in Ubuntu 8.04. It works. But now I
do that in Ubuntu 8.10. I get this error:

[Switching to Thread 0xb733f700 (LWP 16842)]
0xb7f9e430 in __kernel_vsyscall ()
(gdb) bt
#0  0xb7f9e430 in __kernel_vsyscall ()
#1  0xb74b7880 in raise () from /lib/tls/i686/cmov/libc.so.6
#2  0xb74b9248 in abort () from /lib/tls/i686/cmov/libc.so.6
#3  0xb74f510d in ?? () from /lib/tls/i686/cmov/libc.so.6
#4  0xb7586558 in __fortify_fail () from /lib/tls/i686/cmov/libc.so.6
#5  0xb7584680 in __chk_fail () from /lib/tls/i686/cmov/libc.so.6
#6  0xb7584de8 in __realpath_chk () from /lib/tls/i686/cmov/libc.so.6
#7  0x0804f914 in XPCOMGlueLoad (
    xpcomFile=0xbfc9ee64 "/media/olddata/objdir/ss3/dist/bin/libxpcom.so")
    at /usr/include/bits/stdlib.h:46
#8  0x0804f7c5 in XPCOMGlueStartup (xpcomFile=0x0)
    at /home/yinglcs/firefox-3.0/mozilla/xpcom/glue/standalone/nsXPCOMGlue.cpp:70
#9  0x0804bbd0 in main (argc=1, argv=0xbfc9ff14)
    at /home/yinglcs/firefox-3.0/mozilla/embedding/browser/gtk/tests/TestGtkEmbed.cpp:212


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