buffer overflow on cygwin vs solaris.

Song Ken Vern-E11804 kensong@motorola.com
Thu Nov 17 04:32:00 GMT 2005


Hi, 

I am working through some examples in the buffer overflow tutorial at 
http://www.wbglinks.net/pages/reads/wbgreads/bofs/bof07.html

One of the sample code used is this 

#include <syslog.h>

char buffer[4028];

void main() {

   int i;

   for (i=0; i<=4028; i++)
       buffer[i]='A';

   syslog(LOG_ERR, buffer);
}

According to the tutorial, it should produced output
bash$ gcc -g buf.c -o buf
bash$ buf
Segmentation fault (core dumped)

However, on my cygwin installation, it does not core dump. 
bash$ gcc -g buf.c -o buf
bash$ buf
bash$

On Solaris, it does.

How do I get the core dump equivalent on cygwin installation? 

Thanks.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/



More information about the Cygwin mailing list