#include<stdio.h> #include<stdlib.h> int main(int argc, char *argv[]) { int i; for (i = 0; i < 2048; i++) { p1[i] = 0; } return 0; }
Standard input is empty
Standard output is empty
p1 = 0x90df008 p2 = 0x90df410 line.14 passed line.18 passed *** glibc detected *** ./prog: free(): invalid pointer: 0x090df410 *** ======= Backtrace: ========= /lib/i386-linux-gnu/i686/cmov/libc.so.6(+0x6e3f1)[0xb76da3f1] /lib/i386-linux-gnu/i686/cmov/libc.so.6(+0x6fc58)[0xb76dbc58] /lib/i386-linux-gnu/i686/cmov/libc.so.6(cfree+0x6d)[0xb76ded0d] ./prog[0x804849c] /lib/i386-linux-gnu/i686/cmov/libc.so.6(__libc_start_main+0xe6)[0xb7682e46] ./prog[0x8048509] ======= Memory map: ======== 08048000-08049000 r-xp 00000000 09:03 141660 /home/CrtF6Z/prog 08049000-0804a000 rw-p 00000000 09:03 141660 /home/CrtF6Z/prog 090df000-09100000 rw-p 00000000 00:00 0 [heap] b7500000-b7521000 rw-p 00000000 00:00 0 b7521000-b7600000 ---p 00000000 00:00 0 b764d000-b7669000 r-xp 00000000 09:03 92165 /lib/i386-linux-gnu/libgcc_s.so.1 b7669000-b766a000 rw-p 0001b000 09:03 92165 /lib/i386-linux-gnu/libgcc_s.so.1 b766a000-b766c000 rw-p 00000000 00:00 0 b766c000-b77c2000 r-xp 00000000 09:03 959021 /lib/i386-linux-gnu/i686/cmov/libc-2.13.so b77c2000-b77c3000 ---p 00156000 09:03 959021 /lib/i386-linux-gnu/i686/cmov/libc-2.13.so b77c3000-b77c5000 r--p 00156000 09:03 959021 /lib/i386-linux-gnu/i686/cmov/libc-2.13.so b77c5000-b77c6000 rw-p 00158000 09:03 959021 /lib/i386-linux-gnu/i686/cmov/libc-2.13.so b77c6000-b77c9000 rw-p 00000000 00:00 0 b77c9000-b77ed000 r-xp 00000000 09:03 959049 /lib/i386-linux-gnu/i686/cmov/libm-2.13.so b77ed000-b77ee000 r--p 00023000 09:03 959049 /lib/i386-linux-gnu/i686/cmov/libm-2.13.so b77ee000-b77ef000 rw-p 00024000 09:03 959049 /lib/i386-linux-gnu/i686/cmov/libm-2.13.so b77f3000-b77f5000 rw-p 00000000 00:00 0 b77f5000-b77f6000 r-xp 00000000 00:00 0 [vdso] b77f6000-b7812000 r-xp 00000000 09:03 92142 /lib/i386-linux-gnu/ld-2.13.so b7812000-b7813000 r--p 0001b000 09:03 92142 /lib/i386-linux-gnu/ld-2.13.so b7813000-b7814000 rw-p 0001c000 09:03 92142 /lib/i386-linux-gnu/ld-2.13.so bfef8000-bff19000 rw-p 00000000 00:00 0 [stack]