From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS3215 2.6.0.0/16 X-Spam-Status: No, score=-4.0 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id B22FB1F8C6 for ; Thu, 8 Jul 2021 16:37:54 +0000 (UTC) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id EA4073AA7C9C for ; Thu, 8 Jul 2021 16:37:53 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EA4073AA7C9C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1625762274; bh=fTmVeLRkiREDBhyKvZ27IW2/G2LPt+XKZl4OT1+mw2w=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=hY309UhYo/UgKzHoOULDEEtBEf1DG7NyzS+wzKzTralU1swHDQh+CVRlo9OVgApGO lFcD+sXhG6RSMFgBCM/+XeG5jatjRfNgtGhP6yHw5iWKUOSvkQjPFxqIsJ6yltibCj zQG14ye+WxVLytH+mjNwPLy/s1QHMStRWHUKJb/M= Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [46.235.227.227]) by sourceware.org (Postfix) with ESMTPS id CC465399C02F for ; Thu, 8 Jul 2021 16:33:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org CC465399C02F Received: from noise.cbg.collabora.co.uk (unknown [IPv6:2001:4d48:ad5c:ef00:8e70:5aff:fe59:c29c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: vivek) by bhuna.collabora.co.uk (Postfix) with ESMTPSA id 9AB801F43F5E for ; Thu, 8 Jul 2021 17:33:03 +0100 (BST) To: libc-alpha@sourceware.org Subject: [RFC][PATCH v12 7/8] Restore separate libc loading for the TLS/namespace storage test Date: Thu, 8 Jul 2021 17:32:54 +0100 Message-Id: <20210708163255.812-8-vivek@collabora.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210708163255.812-1-vivek@collabora.com> References: <20210708163255.812-1-vivek@collabora.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: =?utf-8?q?Vivek_Das=C2=A0Mohapatra_via_Libc-alpha?= Reply-To: =?UTF-8?q?Vivek=20Das=C2=A0Mohapatra?= Errors-To: libc-alpha-bounces+e=80x24.org@sourceware.org Sender: "Libc-alpha" tst-tls-ie-dlmopen checks to see that new namespaces consume TLS memory as expected: This does not happen when new namespaces share the same libc instance (since TLS is allocated only when a new libc instance insitialises its threading infrastructure). Adding RTLD_ISOLATE to the dlmopen flags in the test restores the old behaviour which allows the test to check what it actually needs to. --- elf/tst-tls-ie-dlmopen.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/elf/tst-tls-ie-dlmopen.c b/elf/tst-tls-ie-dlmopen.c index a579d72d2d..e67017db2d 100644 --- a/elf/tst-tls-ie-dlmopen.c +++ b/elf/tst-tls-ie-dlmopen.c @@ -53,7 +53,7 @@ static void * load_and_access (Lmid_t lmid, const char *mod, const char *func) { /* Load module with TLS. */ - void *p = xdlmopen (lmid, mod, RTLD_NOW); + void *p = xdlmopen (lmid, mod, RTLD_NOW|RTLD_ISOLATE); /* Access the TLS variable to ensure it is allocated. */ void (*f) (void) = (void (*) (void))xdlsym (p, func); f (); @@ -95,7 +95,7 @@ do_test (void) than 1024 bytes are available (exact number depends on TLS optimizations and the libc TLS use). */ printf ("The next dlmopen should fail...\n"); - void *p = dlmopen (LM_ID_BASE, "tst-tls-ie-mod4.so", RTLD_NOW); + void *p = dlmopen (LM_ID_BASE, "tst-tls-ie-mod4.so", RTLD_NOW|RTLD_ISOLATE); if (p != NULL) FAIL_EXIT1 ("error: expected dlmopen to fail because there is " "not enough surplus static TLS.\n"); -- 2.20.1