Thread: *** stack smashing detected ***

  1. #1
    Registered User
    Join Date
    May 2008
    Location
    India
    Posts
    30

    *** stack smashing detected ***

    *** stack smashing detected *** - this is the error I got when I ran my program. After doing some google, i found this happens for the buffer overrun. I looked into the program line by line to find where am I doing that. Finally I was able to find it out, only because its a tiny program. I got the following dumps on my screen. But no idea how to read them and proceed with them.Any link or any guidance will be very much helpful..

    Code:
    *** stack smashing detected ***: pipe2 terminated
    ======= Backtrace: =========
    /lib/tls/i686/cmov/libc.so.6(__fortify_fail+0x48)[0xb7fd7da8]
    /lib/tls/i686/cmov/libc.so.6(__fortify_fail+0x0)[0xb7fd7d60]
    pipe2[0x8048622]
    /lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe5)[0xb7ef0775]
    pipe2[0x8048491]
    ======= Memory map: ========
    08048000-08049000 r-xp 00000000 08:23 1178746    /home/chakra/programming/pipe2
    08049000-0804a000 r--p 00000000 08:23 1178746    /home/chakra/programming/pipe2
    0804a000-0804b000 rw-p 00001000 08:23 1178746    /home/chakra/programming/pipe2
    0805d000-0807e000 rw-p 0805d000 00:00 0          [heap]
    b7ed9000-b7eda000 rw-p b7ed9000 00:00 0 
    b7eda000-b8036000 r-xp 00000000 08:22 792661     /lib/tls/i686/cmov/libc-2.9.so
    b8036000-b8037000 ---p 0015c000 08:22 792661     /lib/tls/i686/cmov/libc-2.9.so
    b8037000-b8039000 r--p 0015c000 08:22 792661     /lib/tls/i686/cmov/libc-2.9.so
    b8039000-b803a000 rw-p 0015e000 08:22 792661     /lib/tls/i686/cmov/libc-2.9.so
    b803a000-b803d000 rw-p b803a000 00:00 0 
    b803e000-b804b000 r-xp 00000000 08:22 767105     /lib/libgcc_s.so.1
    b804b000-b804c000 r--p 0000c000 08:22 767105     /lib/libgcc_s.so.1
    b804c000-b804d000 rw-p 0000d000 08:22 767105     /lib/libgcc_s.so.1
    b804d000-b8050000 rw-p b804d000 00:00 0 
    b8050000-b8051000 r-xp b8050000 00:00 0          [vdso]
    b8051000-b806d000 r-xp 00000000 08:22 767063     /lib/ld-2.9.so
    b806d000-b806e000 r--p 0001b000 08:22 767063     /lib/ld-2.9.so
    b806e000-b806f000 rw-p 0001c000 08:22 767063     /lib/ld-2.9.so
    bf859000-bf86e000 rw-p bffeb000 00:00 0          [stack]
    Process 8958 ended

  2. #2
    Deathray Engineer MacGyver's Avatar
    Join Date
    Mar 2007
    Posts
    3,210
    You said that you found where you were overrunning a buffer. So fix the problem.

  3. #3
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    Didn't you already post this same question and have it answered already?

    *** stack smashing detected ***
    help on *** stack smashing detected ***

    Well maybe it wasn't you after all. There is a search function to this forum though.


    Quzah.
    Hope is the first step on the road to disappointment.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. *** stack smashing detected ***
    By Martin_HS in forum C Programming
    Replies: 9
    Last Post: 05-29-2009, 04:01 AM
  2. stack and pointer problem
    By ramaadhitia in forum C Programming
    Replies: 2
    Last Post: 09-11-2006, 11:41 PM
  3. Question about a stack using array of pointers
    By Ricochet in forum C++ Programming
    Replies: 6
    Last Post: 11-17-2003, 10:12 PM
  4. error trying to compile stack program
    By KristTlove in forum C++ Programming
    Replies: 2
    Last Post: 11-03-2003, 06:27 PM
  5. Stack Program Here
    By Troll_King in forum C Programming
    Replies: 7
    Last Post: 10-15-2001, 05:36 PM