From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B3F343858CDB; Mon, 12 Feb 2024 12:17:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B3F343858CDB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1707740259; bh=aGnit/UorQ/RFMZVZRftRhYiUTOlXar4kwU9qlvhxHE=; h=From:To:Subject:Date:In-Reply-To:References:From; b=kQQpOCdV89vLVxx7PxcW/cNiVfynbTf0gk9MgG+4RGguEuUKNkOmXwCfiF9P6OPey 52eaeBngbEvRHiZriv8bc215VQqdchA+CODVhao7fkW5JuYY2kyTxOMAGWjMR44Lts VWmEVWg7cMkv4ZQzGp8gvoqS6nE82jRMvBXE5eZg= From: "fw at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/113874] GNU2 TLS descriptor calls do not follow psABI on x86_64-linux-gnu Date: Mon, 12 Feb 2024 12:17:38 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 13.2.1 X-Bugzilla-Keywords: ABI, wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: fw at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D113874 --- Comment #18 from Florian Weimer --- (In reply to Richard Biener from comment #16) > I do wonder why __tls_get_addr would have to call the overloaded malloc, = can > we just not force-bind it to the glibc local malloc (and make sure that's > compiled with -mgeneral-regs-only)? Using the glibc malloc just for some small TLS allocation is rather wasteful because of its (mostly) per-thread data structures. Allocating from the main arena potentially clashes with brk usage from the replacement malloc. We'd need an alternative memory allocator (in addition to replacement string functions), but that is known to break Thread Sanitizer and Leak Sanitizer.=