From owner-freebsd-hackers Tue Jan 23 23:53:30 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from mail.newst.irs.ru (newst.irs.ru [212.164.94.1]) by hub.freebsd.org (Postfix) with ESMTP id 788A437B400 for ; Tue, 23 Jan 2001 23:53:09 -0800 (PST) Received: from lark.nsk.bsgdesign.com (lark.nsk.bsgdesign.com [192.168.3.21]) by mail.newst.irs.ru (8.11.1/8.11.0) with ESMTP id f0O7qgX65850; Wed, 24 Jan 2001 13:52:48 +0600 (NOVT) (envelope-from fjoe@newst.net) Date: Wed, 24 Jan 2001 13:52:11 +0600 (NOVT) From: Max Khon X-Sender: fjoe@localhost To: Joe Albowicz Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: need help with pthreads and memory corruption problem In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG hi, there! On Tue, 23 Jan 2001, Joe Albowicz wrote: > I'm porting an application from Linux to FreeBSD and I am having some > problems with the program crashing in weird/random places because of > memory corruption. For example the crash can happen in STL or free or in > c++ code that we have written (note that our code works just fine on Linux > for extended periods of time under heavy load). > > The application consists of a main process plus a few dozen pthreads > written in c++. The only changes that I have made in porting from Linux to > FreeBSD consisted of Makefile changes (e.g. using -D_THREAD_SAFE) and I > replaced "new" with malloc in code that is excuted by the pthreads [except > STL may call new?]. Replacing new with malloc definately helped, but I'm > not sure why. [...] > FreeBSD 4.2-RELEASE FreeBSD 4.2-RELEASE #0 please upgrade to latest -stable. there have been problems with C++ and threads in 4.2-RELEASE and they have been fixed recently /fjoe To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message