From owner-freebsd-ia64@FreeBSD.ORG Mon Jan 16 00:30:10 2006 Return-Path: X-Original-To: freebsd-ia64@hub.freebsd.org Delivered-To: freebsd-ia64@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 46F5716A422 for ; Mon, 16 Jan 2006 00:30:10 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id F276F43D49 for ; Mon, 16 Jan 2006 00:30:08 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k0G0U8vH040990 for ; Mon, 16 Jan 2006 00:30:08 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k0G0U8TL040985; Mon, 16 Jan 2006 00:30:08 GMT (envelope-from gnats) Resent-Date: Mon, 16 Jan 2006 00:30:08 GMT Resent-Message-Id: <200601160030.k0G0U8TL040985@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ia64@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Marcel Moolenaar Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B9AD116A41F for ; Mon, 16 Jan 2006 00:22:50 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [216.136.204.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8344F43D48 for ; Mon, 16 Jan 2006 00:22:50 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.13.1/8.13.1) with ESMTP id k0G0Mo7B079468 for ; Mon, 16 Jan 2006 00:22:50 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.13.1/8.13.1/Submit) id k0G0MosU079467; Mon, 16 Jan 2006 00:22:50 GMT (envelope-from nobody) Message-Id: <200601160022.k0G0MosU079467@www.freebsd.org> Date: Mon, 16 Jan 2006 00:22:50 GMT From: Marcel Moolenaar To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-2.3 Cc: Subject: ia64/91846: TLS: malloc(3) exposes DTLS bug in non-threaded applications X-BeenThere: freebsd-ia64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the IA-64 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Jan 2006 00:30:10 -0000 >Number: 91846 >Category: ia64 >Synopsis: TLS: malloc(3) exposes DTLS bug in non-threaded applications >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-ia64 >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Jan 16 00:30:07 GMT 2006 >Closed-Date: >Last-Modified: >Originator: Marcel Moolenaar >Release: 7-CURRENT >Organization: >Environment: FreeBSD bigsur.pn.xcllnt.net 7.0-CURRENT FreeBSD 7.0-CURRENT #1: Fri Jan 13 16:26:27 PST 2006 marcel@bigsur.pn.xcllnt.net:/usr/obj/nfs/freebsd/7.x/src/sys/BIGSUR ia64 >Description: When NO_TLS is *not* defined in src/lib/libc/stdlib/malloc.c on ia64, then a SIGSEGV will result due to arenas_map being thread-local and it being referenced in choose_arena(). That reference causes a thread-local relocation to end up in tls_get_addr_common() in src/libexec/rtld-elf/rtld.c for which the dtvp argument is NULL. This pretty much means that __tls_get_addr() on ia64 does the wrong thing. In this case it assumes that r13 (aka TP) is non-NULL in all cases, which is false for non-threaded applications. >How-To-Repeat: n/a >Fix: tbd >Release-Note: >Audit-Trail: >Unformatted: From owner-freebsd-ia64@FreeBSD.ORG Mon Jan 16 10:09:48 2006 Return-Path: X-Original-To: freebsd-ia64@freebsd.org Delivered-To: freebsd-ia64@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0649616A41F; Mon, 16 Jan 2006 10:09:48 +0000 (GMT) (envelope-from dfr@rabson.org) Received: from itchy.rabson.org (mailgate.nlsystems.com [80.177.232.242]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1303B43D45; Mon, 16 Jan 2006 10:09:46 +0000 (GMT) (envelope-from dfr@rabson.org) Received: from herring.rabson.org (herring.rabson.org [80.177.232.250]) by itchy.rabson.org (8.13.3/8.13.3) with ESMTP id k0GA9iq7084956; Mon, 16 Jan 2006 10:09:44 GMT (envelope-from dfr@rabson.org) From: Doug Rabson To: freebsd-ia64@freebsd.org Date: Mon, 16 Jan 2006 10:09:41 +0000 User-Agent: KMail/1.8.3 References: <200601160022.k0G0MosU079467@www.freebsd.org> In-Reply-To: <200601160022.k0G0MosU079467@www.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-6" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200601161009.42687.dfr@rabson.org> X-Spam-Status: No, score=0.0 required=5.0 tests=UNPARSEABLE_RELAY autolearn=failed version=3.1.0 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on itchy.rabson.org X-Virus-Scanned: ClamAV 0.87.1/1243/Sun Jan 15 18:35:18 2006 on itchy.rabson.org X-Virus-Status: Clean Cc: freebsd-gnats-submit@freebsd.org Subject: Re: ia64/91846: TLS: malloc(3) exposes DTLS bug in non-threaded applications X-BeenThere: freebsd-ia64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the IA-64 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Jan 2006 10:09:48 -0000 On Monday 16 January 2006 00:22, Marcel Moolenaar wrote: > >Number: 91846 > >Category: ia64 > >Synopsis: TLS: malloc(3) exposes DTLS bug in non-threaded > > applications Confidential: no > >Severity: serious > >Priority: medium > >Responsible: freebsd-ia64 > >State: open > >Quarter: > >Keywords: > >Date-Required: > >Class: sw-bug > >Submitter-Id: current-users > >Arrival-Date: Mon Jan 16 00:30:07 GMT 2006 > >Closed-Date: > >Last-Modified: > >Originator: Marcel Moolenaar > >Release: 7-CURRENT > >Organization: > >Environment: > > FreeBSD bigsur.pn.xcllnt.net 7.0-CURRENT FreeBSD 7.0-CURRENT #1: Fri > Jan 13 16:26:27 PST 2006 > marcel@bigsur.pn.xcllnt.net:/usr/obj/nfs/freebsd/7.x/src/sys/BIGSUR > ia64 > > >Description: > > When NO_TLS is *not* defined in src/lib/libc/stdlib/malloc.c on ia64, > then a SIGSEGV will result due to arenas_map being thread-local and > it being referenced in choose_arena(). That reference causes a > thread-local relocation to end up in tls_get_addr_common() in > src/libexec/rtld-elf/rtld.c for which the dtvp argument is NULL. This > pretty much means that __tls_get_addr() on ia64 does the wrong thing. > In this case it assumes that r13 (aka TP) is non-NULL in all cases, > which is false for non-threaded applications. I don't understand this. Any dynamic application (threaded or non-threaded) should end up calling .../ia64/reloc.c:allocate_initial_tls() which sets r13 to point at the TLS block for the main thread (or only thread for non-threaded). From owner-freebsd-ia64@FreeBSD.ORG Mon Jan 16 10:10:06 2006 Return-Path: X-Original-To: freebsd-ia64@hub.freebsd.org Delivered-To: freebsd-ia64@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C93E716A41F for ; Mon, 16 Jan 2006 10:10:06 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 584D243D45 for ; Mon, 16 Jan 2006 10:10:06 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k0GAA6X7077854 for ; Mon, 16 Jan 2006 10:10:06 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k0GAA6IV077853; Mon, 16 Jan 2006 10:10:06 GMT (envelope-from gnats) Date: Mon, 16 Jan 2006 10:10:06 GMT Message-Id: <200601161010.k0GAA6IV077853@freefall.freebsd.org> To: freebsd-ia64@FreeBSD.org From: Doug Rabson Cc: Subject: Re: ia64/91846: TLS: malloc(3) exposes DTLS bug in non-threaded applications X-BeenThere: freebsd-ia64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Doug Rabson List-Id: Porting FreeBSD to the IA-64 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Jan 2006 10:10:06 -0000 The following reply was made to PR ia64/91846; it has been noted by GNATS. From: Doug Rabson To: freebsd-ia64@freebsd.org Cc: Marcel Moolenaar , freebsd-gnats-submit@freebsd.org Subject: Re: ia64/91846: TLS: malloc(3) exposes DTLS bug in non-threaded applications Date: Mon, 16 Jan 2006 10:09:41 +0000 On Monday 16 January 2006 00:22, Marcel Moolenaar wrote: > >Number: 91846 > >Category: ia64 > >Synopsis: TLS: malloc(3) exposes DTLS bug in non-threaded > > applications Confidential: no > >Severity: serious > >Priority: medium > >Responsible: freebsd-ia64 > >State: open > >Quarter: > >Keywords: > >Date-Required: > >Class: sw-bug > >Submitter-Id: current-users > >Arrival-Date: Mon Jan 16 00:30:07 GMT 2006 > >Closed-Date: > >Last-Modified: > >Originator: Marcel Moolenaar > >Release: 7-CURRENT > >Organization: > >Environment: > > FreeBSD bigsur.pn.xcllnt.net 7.0-CURRENT FreeBSD 7.0-CURRENT #1: Fri > Jan 13 16:26:27 PST 2006 > marcel@bigsur.pn.xcllnt.net:/usr/obj/nfs/freebsd/7.x/src/sys/BIGSUR > ia64 > > >Description: > > When NO_TLS is *not* defined in src/lib/libc/stdlib/malloc.c on ia64, > then a SIGSEGV will result due to arenas_map being thread-local and > it being referenced in choose_arena(). That reference causes a > thread-local relocation to end up in tls_get_addr_common() in > src/libexec/rtld-elf/rtld.c for which the dtvp argument is NULL. This > pretty much means that __tls_get_addr() on ia64 does the wrong thing. > In this case it assumes that r13 (aka TP) is non-NULL in all cases, > which is false for non-threaded applications. I don't understand this. Any dynamic application (threaded or non-threaded) should end up calling .../ia64/reloc.c:allocate_initial_tls() which sets r13 to point at the TLS block for the main thread (or only thread for non-threaded). From owner-freebsd-ia64@FreeBSD.ORG Mon Jan 16 11:02:37 2006 Return-Path: X-Original-To: freebsd-ia64@freebsd.org Delivered-To: freebsd-ia64@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9915D16A41F for ; Mon, 16 Jan 2006 11:02:37 +0000 (GMT) (envelope-from owner-bugmaster@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id CF46D43D60 for ; Mon, 16 Jan 2006 11:02:30 +0000 (GMT) (envelope-from owner-bugmaster@freebsd.org) Received: from freefall.freebsd.org (peter@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k0GB2TaY084870 for ; Mon, 16 Jan 2006 11:02:29 GMT (envelope-from owner-bugmaster@freebsd.org) Received: (from peter@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k0GB2SEp084864 for freebsd-ia64@freebsd.org; Mon, 16 Jan 2006 11:02:28 GMT (envelope-from owner-bugmaster@freebsd.org) Date: Mon, 16 Jan 2006 11:02:28 GMT Message-Id: <200601161102.k0GB2SEp084864@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: peter set sender to owner-bugmaster@freebsd.org using -f From: FreeBSD bugmaster To: freebsd-ia64@FreeBSD.org Cc: Subject: Current problem reports assigned to you X-BeenThere: freebsd-ia64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the IA-64 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Jan 2006 11:02:37 -0000 Current FreeBSD problem reports Critical problems Serious problems S Submitted Tracker Resp. Description ------------------------------------------------------------------------------- o [2005/09/05] ia64/85772 ia64 [gpt] gpt (geom_) needs to adopt g_ctl o [2006/01/16] ia64/91846 ia64 TLS: malloc(3) exposes DTLS bug in non-th 2 problems total. Non-critical problems S Submitted Tracker Resp. Description ------------------------------------------------------------------------------- o [2005/09/16] ia64/86218 ia64 Mozilla / Firefox: regxpcom or regchrome 1 problem total.