delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/11/16/22:08:05

MIME-Version: 1.0
Subject: buffer overflow on cygwin vs solaris.
Date: Wed, 16 Nov 2005 22:07:50 -0500
Message-ID: <7D40F487BB77314D8392F8C910348F6054E4E0@ZMY16EXM65.ds.mot.com>
From: "Song Ken Vern-E11804" <kensong AT motorola DOT com>
To: <cygwin AT cygwin DOT com>
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id jAH3830K023462

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/


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019