From owner-freebsd-bugs Thu Aug 23 4:50:14 2001 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id D69CD37B408 for ; Thu, 23 Aug 2001 04:50:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.4/8.11.4) id f7NBo1N52570; Thu, 23 Aug 2001 04:50:01 -0700 (PDT) (envelope-from gnats) Received: from unix-server.local.gem.pl (gateway.g-em.pl [212.45.233.230]) by hub.freebsd.org (Postfix) with ESMTP id 1BF2E37B401 for ; Thu, 23 Aug 2001 04:49:45 -0700 (PDT) (envelope-from acid@unix-server.local.gem.pl) Received: (from acid@localhost) by unix-server.local.gem.pl (8.11.5/8.11.5) id f7NBnTu98952; Thu, 23 Aug 2001 13:49:29 +0200 (CEST) (envelope-from acid) Message-Id: <200108231149.f7NBnTu98952@unix-server.local.gem.pl> Date: Thu, 23 Aug 2001 13:49:29 +0200 (CEST) From: Jakub Kruszona-Zawadzki Reply-To: Jakub Kruszona-Zawadzki To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.113 Subject: misc/29987: error in libc (simultanous call to malloc or free and printf causes Segmentation Fault) Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 29987 >Category: misc >Synopsis: error in libc (simultanous call to malloc or free and printf causes Segmentation Fault) >Confidential: no >Severity: serious >Priority: high >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Aug 23 04:50:00 PDT 2001 >Closed-Date: >Last-Modified: >Originator: Jakub Kruszona-Zawadzki >Release: FreeBSD 4.4-PRERELEASE i386 >Organization: Global eMarketing S.A. >Environment: System: FreeBSD unix-server.local.gem.pl 4.4-PRERELEASE FreeBSD 4.4-PRERELEASE #0: Wed Aug 8 11:23:46 CEST 2001 acid@unix-server.local.gem.pl:/usr/obj/usr/src/sys/GEMIUS i386 Machine: Celeron 600 same bug exists on different freebsd versions. We tested FreeBSD 4.1 and FreeBSD 4.3. On both problem exists (We tested it on Linux too - there is no such problem) >Description: It looks like libc has problems with simultanous calls to some functions >How-To-Repeat: Just compile, and run this code: /-------------------------------------------------/ #include #include void salarm(int sn) { static int s=1; alarm(1); fprintf(stderr,"Test %09d, %lf\n",s,1/((double)s)); s++; } int main() { char *a; int i; signal(SIGALRM,salarm); alarm(1); for (i=0 ; i<1000000 ; i++) { a=(char *)malloc(1000000); if (a==NULL) printf("NULL !!!\n"); free(a); } return 1; } /-------------------------------------------------/ >Fix: >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message