$cat debugtest.c            
#include <stdio.h>
int main(int argc,char** argv)
   {
   int i;
   char* input;
   
   input=-1;
   for (i=0;i<=100;i++)
      printf("%d ",i);
   kill(8,getpid());
   kill(9,getpid());
   sscanf(input,"%s",input);
   }
$gcc -g -static debugtest.c
debugtest.c: In function `main':
debugtest.c:7: warning: assignment makes pointer from integer without a cast
$echo blubb > aout.in       
$ulimit -c unlimited        
$a.out < aout.in            
Memory fault (core dumped) 
$gdb -silent a.out core     
Core was generated by `a.out'.
Program terminated with signal 11, Segmentation fault.
#0  0x8049690 in _IO_str_init_static (fp=0xbffff890, 
    ptr=0xffffffff <Address 0xffffffff out of bounds>, size=0, pstart=0x0)
    at strops.c:66
strops.c:66: No such file or directory.
(gdb) where
#0  0x8049690 in _IO_str_init_static (fp=0xbffff890, 
    ptr=0xffffffff <Address 0xffffffff out of bounds>, size=0, pstart=0x0)
    at strops.c:66
#1  0x80487a2 in _IO_vsscanf (
    string=0xffffffff <Address 0xffffffff out of bounds>, 
    format=0x80678f0 "%s", args=0xbffff90c) at iovsscanf.c:40
#2  0x80486b4 in sscanf (s=0xffffffff <Address 0xffffffff out of bounds>, 
    format=0x80678f0 "%s") at sscanf.c:33
#3  0x80481fc in main (argc=1, argv=0xbffff934) at debugtest.c:12
(gdb) up
#1  0x80487a2 in _IO_vsscanf (
    string=0xffffffff <Address 0xffffffff out of bounds>, 
    format=0x80678f0 "%s", args=0xbffff90c) at iovsscanf.c:40
iovsscanf.c:40: No such file or directory.
(gdb) up
#2  0x80486b4 in sscanf (s=0xffffffff <Address 0xffffffff out of bounds>, 
    format=0x80678f0 "%s") at sscanf.c:33
sscanf.c:33: No such file or directory.
(gdb) up
#3  0x80481fc in main (argc=1, argv=0xbffff934) at debugtest.c:12
12         sscanf(input,"%s",input);
(gdb) print input
$1 = 0xffffffff <Address 0xffffffff out of bounds>
(gdb) list
7          input=-1;
8          for (i=0;i<=100;i++)
9             printf("%d ",i);
10         kill(8,getpid());
11         kill(9,getpid());
12         sscanf(input,"%s",input);
13         }
(gdb) quit