From owner-freebsd-threads@FreeBSD.ORG Fri Aug 29 23:30:04 2008 Return-Path: Delivered-To: freebsd-threads@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C7D991065676 for ; Fri, 29 Aug 2008 23:30:04 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id BBE738FC2C for ; Fri, 29 Aug 2008 23:30:04 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m7TNU4wZ027174 for ; Fri, 29 Aug 2008 23:30:04 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m7TNU4Yu027171; Fri, 29 Aug 2008 23:30:04 GMT (envelope-from gnats) Date: Fri, 29 Aug 2008 23:30:04 GMT Message-Id: <200808292330.m7TNU4Yu027171@freefall.freebsd.org> To: freebsd-threads@FreeBSD.org From: agile@sunbay.com Cc: Subject: Re: threads/126950: rtld malloc is thread-unsafe X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: agile@sunbay.com List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Aug 2008 23:30:04 -0000 The following reply was made to PR threads/126950; it has been noted by GNATS. From: agile@sunbay.com To: "Alexander Kabaev" Cc: bug-followup@FreeBSD.org Subject: Re: threads/126950: rtld malloc is thread-unsafe Date: Sat, 30 Aug 2008 02:00:10 +0300 (EEST) Thx for hint, Alexander. There only two functions, that called without bind lock: objlist_call_init, objlist_call_fini, they both use errmsg_save (which call xstrdup) errmsg_restore (which call free) Need to move them under exclusive bind lock protection. > 1. The locking implementation in this patch is broken. > 2. rtld malloc is not supposed to be called from multiple threads and > needs to be protected by exclusive bind lock. If there are code > sections that call malloc without exclusive lock held, rtld > should be fixed to move them under lock protection. > > -- > Alexander Kabaev >