On Fri, Mar 30, 2018 at 05:17:21PM +0800, r@xxxxxx wrote: > From: Heiher <r@xxxxxx> > > The following program cause an endless loop in kernel space: > > #include <stdio.h> > #include <unistd.h> > #include <signal.h> > > int > main (int argc, char *argv[]) > { > char buf[16]; > > printf ("%p\n", buf); > raise (SIGINT); > > write (1, buf, 16); > > return 0; > } > > # gcc -O0 -o t t.c > # gdb ./t > (gdb) r > (gdb) watch *<printed buf address> > (gdb) c Please add more explanation so that a future reader can see what the problem was and how you fixed it. Thanks James
Attachment:
signature.asc
Description: Digital signature