www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/1998/03/19/21:14:06

From: cgf AT bbc DOT com (Christopher Faylor)
Subject: Re: new malloc/free gives problems on win95
19 Mar 1998 21:14:06 -0800 :
Message-ID: <Eq2JEJ.22E.cygnus.cygwin32.developers@bbc.com>
References: <35112f42 DOT 84792043 AT smtp DOT netzone DOT com>
Reply-To: cgf AT bbc DOT com
To: cygwin32-developers AT cygnus DOT com

In article <35112f42 DOT 84792043 AT smtp DOT netzone DOT com>,
Mikey <jeffdbREMOVETHIS AT netzone DOT com> wrote:
>win95b
>P100
>32M
>egcs-1.0.2 prerelease from Mumit
>
>I've built the B19.1 cygwinb19.dll against the
>newlib-980310 with Doug Lea's malloc
>implimentation, and it seems that I am
>always getting segfaults in malloc or free.
>
>segfaults in the same places in the same programs from B19.1
>cygwinb19.dll from the web site. 
>(no symbols so I can't tell for sure what functions ;^)
>
>had to change _read and _write from ssize_t returns to int returns in syscalls.h
>
>newlib/libc/include/sys/fcntl.h
>extern int _open _PARAMS ((const char *, int, ...));
>to
>extern int _open _PARAMS ((const char *, int, mode_t mode));
>
>also .data$nocopy to .data_cygwin_nocopy && fixed ld
>
>but otherwise no changes. (that I remember ;^)
>
>when I reverted to the newlib/ & malloc.cc from sergey's 971103 release
>the problems went away. (changes to dcrt0.cc  winsup.h libc/sys/signal.h
>libc/sys/cygwin32/sys/dirent.h)
>
>has anyone else seen this?

This version of malloc is very picky about freeing already freed or never
malloced memory.  There were many similar complaints in the linux mailing
lists when this malloc was used in libc.so.

So, it may not be a problem with malloc but with a formerly quiet bug in
your program.
-- 
http://www.bbc.com/	cgf AT bbc DOT com			"Strange how unreal
VMS=>UNIX Solutions	Boston Business Computing	 the real can be."

- Raw text -


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