‰ gdb ./a.out
GNU gdb (Gentoo 7.2 p1) 7.2
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
For bug reporting instructions, please see:
<http://bugs.gentoo.org/>...
Reading symbols from /tmp/a.out...done.
(gdb) break main
Breakpoint 1 at 0x4005dc: file a.c, line 6.
(gdb) run
Starting program: /tmp/a.out
Breakpoint 1, main () at a.c:6
6 char *a = malloc(10000000);
(gdb) call setbuf(stdout, 0)
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7ab9096 in setbuffer () from /lib64/libc.so.6
The program being debugged was signaled while in a function called from GDB.
GDB remains in the frame where the signal was received.
To change this behavior use "set unwindonsignal on".
Evaluation of the expression containing the function
(setbuf) will be abandoned.
When the function is done executing, GDB will silently stop.
ЧЯДНТ?