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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thank you Andrew.

But how can I find out

It is the 'TestGtkEmbed' application in mozilla source code.

This call is a mozilla function call:

>> #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

Moreover, I did compile TestGtkEmbed with debug, that is why 'bt' works, right?
Again, the same source compile and runs in ubuntu 8.0.4 and it fails
in ubuntu 8.10.

Thank you for your help all along.

Regards,



On Fri, Nov 28, 2008 at 4:54 AM, Andrew Haley <aph@xxxxxxxxxx> wrote:
> ying lcs wrote:
>> On Thu, Nov 27, 2008 at 4:06 AM, Andrew Haley <aph@xxxxxxxxxx> 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.
> \
>>>
>> Thanks. But it appears it crashes inside libc?
>
> Doesn't look like it to me.  The buffer overflow was detected by
> libc.  You have to look at the buffer in question and see where it's
> overflowing.  It's near impossible here because you don't have debuginfo
> for the libraries.
>
>> 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
>
> Probably the same problem.  Someone is writing outside the memory
> that's been allocated.
>
> Andrew.
>

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux