From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2054.outbound.protection.outlook.com [40.107.20.54]) by sourceware.org (Postfix) with ESMTPS id C64ED393C85F for ; Tue, 13 Apr 2021 08:18:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org C64ED393C85F Received: from AM6P195CA0028.EURP195.PROD.OUTLOOK.COM (2603:10a6:209:81::41) by VE1PR08MB5726.eurprd08.prod.outlook.com (2603:10a6:800:1b2::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4020.17; Tue, 13 Apr 2021 08:18:37 +0000 Received: from VE1EUR03FT005.eop-EUR03.prod.protection.outlook.com (2603:10a6:209:81:cafe::49) by AM6P195CA0028.outlook.office365.com (2603:10a6:209:81::41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4020.17 via Frontend Transport; Tue, 13 Apr 2021 08:18:36 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; sourceware.org; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;sourceware.org; dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by VE1EUR03FT005.mail.protection.outlook.com (10.152.18.172) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4020.17 via Frontend Transport; Tue, 13 Apr 2021 08:18:36 +0000 Received: ("Tessian outbound 82c2d58b350b:v90"); Tue, 13 Apr 2021 08:18:36 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: dcee58c87e68cae2 X-CR-MTA-TID: 64aa7808 Received: from d499ea259de4.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id A93C39A5-3D01-4102-BEB1-39D2CBA0ECBB.1; Tue, 13 Apr 2021 08:18:30 +0000 Received: from EUR03-VE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id d499ea259de4.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 13 Apr 2021 08:18:30 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=U9MJvrlIsNwKM6w2raJKVivJOVKy/TQiIdJHjO4UZnp9dIWTnXNjHydaTPoBCxrjejZ3pT4om0E2i68YEWCmYoEmp/T0GwpplNhJa/dmxMssruMxHYumm9Tcqo/Cwun3iB4Ya5QbB5/6sQnmLTzawNz3AayQi69Jvora1/ZkYbq/zAeqDBdllxQL1oSEi7ipatGoP6CLh0mXCQdrK96h6AzM5pbRLqVtl+QKsteGFazRe7Rn236Fis/gA/815VXw1RQSR66Ml1s2K3G56Ll4ykzNpo90lLSXNQRL7FOaymx8HipUv4RD6uyWNGE9kRM4mx00Jh/czD0StPhHL4eyzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=9G9splqBIdKlO6aE8FFsD3PfTBxDSW63VoEvmT+GNkE=; b=RP/JRs8N4Ia1EQLue0uC0tZJWZ1xiLt2SmEnrl5obO0APmS+Fu9iLCTCTh9mOVqr093utiNiCynUqzLas2zh8qEXQI19eWI3zY9Ii5dHexkRKScWy2VLDDb/RsDqeDXuA/jqtSH8xqgl+hgoi4H/0Puw1lv3IvnRgk8sH8CI8mS0tRBmtTMKaL3/PVNdnSnTLNUuPT4YmqGuFGD7CzRYwlZpULGsMTSIKK9Vp0t7l2u9AnhINzXhvVJBja0r+zj5Ckp70AS+rSdYTMqUnFilbHv5ZWn4hatCgUi9qIRUxdpgG04smMx67E1nHFuRtLrM6KO6hCgFOtAZ1x3n571+PA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none Authentication-Results-Original: sourceware.org; dkim=none (message not signed) header.d=none;sourceware.org; dmarc=none action=none header.from=arm.com; Received: from PA4PR08MB6320.eurprd08.prod.outlook.com (2603:10a6:102:e5::9) by PAXPR08MB6541.eurprd08.prod.outlook.com (2603:10a6:102:15a::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4020.19; Tue, 13 Apr 2021 08:18:29 +0000 Received: from PA4PR08MB6320.eurprd08.prod.outlook.com ([fe80::c99f:671d:bb2c:f20b]) by PA4PR08MB6320.eurprd08.prod.outlook.com ([fe80::c99f:671d:bb2c:f20b%7]) with mapi id 15.20.4020.022; Tue, 13 Apr 2021 08:18:29 +0000 From: Szabolcs Nagy To: libc-alpha@sourceware.org Subject: [PATCH v2 02/14] elf: Add a DTV setup test [BZ #27136] Date: Tue, 13 Apr 2021 09:18:22 +0100 Message-Id: <0b160a0060cd209a33496da51f915258ec5dd9a5.1618301209.git.szabolcs.nagy@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: References: Content-Type: text/plain X-Originating-IP: [217.140.106.55] X-ClientProxiedBy: LO4P123CA0022.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:151::9) To PA4PR08MB6320.eurprd08.prod.outlook.com (2603:10a6:102:e5::9) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (217.140.106.55) by LO4P123CA0022.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:151::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4020.21 via Frontend Transport; Tue, 13 Apr 2021 08:18:28 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 47e463bf-09c8-4ba3-a517-08d8fe54bc88 X-MS-TrafficTypeDiagnostic: PAXPR08MB6541:|VE1PR08MB5726: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:9508;OLM:9508; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: a2s26ABpxFvgbvfC3bhV93pnpDZVUc3uX6FB5sdftF22Y22VXo88lVqNQn1anSDbhGHHaXAmCNioKbtAAhHRzGapX0v6EI1PyHytC+udddi8W441qWvqD+PvXY/qe0HAY0zvEkt/utAOVuHeFSRwseEb2T9sdT9Qjk08a6r1cWRu9+ndgjgFug7s2nDPq6aWOBzAoWZ8tXdGtOxC1e7i0PUuUNqvEYwr/QpTK+chFFDN+McMwIrYgBsBAQAmNjZCxGPH8uYyG9dz34MrqjTgy6prgKqhKwYfIxjWOkq1hWa4uT6Peh8vNcKTvQEaWrDVgqbWDVY2hCeftP7f0uUkMJEcByEpADwCoGV9tZUCq3GBJpkIUzU+RPvapRXdq3loGgppfYJ1FAg7xc9PlkPzPU7f9Oee9vSp+5uQXJkNpS8a4jDHOBzn7g4lRfGd06t+RqN+ZperYkFqWTI6Vy+GJxKspBsYb7KyglMfeNd972tZFcarGPYbQ5K4TcwPET6Ls+kAK19RuYgDsFBHaegvBjflZQCaQVzIV6+/+gN7CC3ZUw8KB4khWaTEkeAjITWGfllz01GzCIo2iHZevD+vCYHv3NYsLwc9YNtrbpGwdbJFEUiWupezkOf3YaqUnAAfB9ng4BUOhjb2dqzzWGTai1v/LvRday06Zmk0RKF3vNgC/jNYmXpbQJwdFBrHQ9PKShp+9i5u4AtWH48fxqcY0pcTw1MyeZ8sKnOGPggMrQ9eDMbWPUl/wvDmi+PTzcW4sSwNcYcSZJwrpQPRnBwAZBN88bvS2RtuxjfhULf3CVg= X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PA4PR08MB6320.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(396003)(376002)(346002)(366004)(39860400002)(136003)(16526019)(316002)(8936002)(478600001)(52116002)(83380400001)(26005)(186003)(6512007)(69590400012)(6916009)(66946007)(8676002)(2906002)(36756003)(86362001)(66476007)(6506007)(44832011)(5660300002)(38100700002)(6486002)(6666004)(66556008)(38350700002)(956004)(2616005)(2004002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: =?us-ascii?Q?/rot6w9TA419m1+GxVS7sUU4VtY/2g/gG4N7ca/CTSg+mNpQwE4ehamrZ36L?= =?us-ascii?Q?Igytjws3K5hyu3/8McECa5O/S9aHCLDkdEF6lXs4/F3YPQLbjfYDKFLcNUOm?= =?us-ascii?Q?69av24fsXqK8lJ4gm0A7Gg9A2pZQhYZ/zAmUQPfYSf42CxlagXihij9hvkoz?= =?us-ascii?Q?+CjQmEzw3GcB1W7SsdTrIEWFYTpiRtn/OqHPaOepJzdFzIc9EsTHmBqHtZ6t?= =?us-ascii?Q?rkat5htu9nRNVe4GeL9usQQXM3W4d0MO/3+TTO4AfRwX+ww1qZtwBKN0G0kt?= =?us-ascii?Q?WVfekSX/qIxaAJQpfjKsby1LL6H1sZw5hN/BBYw4UQ96yqE+Cu+n6zVVB4hY?= =?us-ascii?Q?Go0dHE3rL4D/Ot9v0YXD7dp91N9ZKwojnCHSAxGDi6UjfUJevCD+D3THI/yL?= =?us-ascii?Q?D6Y46zImepSau+sdCIVUxRZ/tk6haPSfqmMm+4fSu+g/MLg2qSS57TmTv4n/?= =?us-ascii?Q?49PWt1RHr+iuUvB9ItA5Fbx3/f/cLZJ5WHcYT+FUnWSetVVvtnlrk5uCa6Nq?= =?us-ascii?Q?R4BMGOZ7Q88IvrJ/2ikyP1JqhBt0xSvstJsuhhjE29/4ahl5vawPyavpYW2U?= =?us-ascii?Q?BzB2NwqwXPQFrY+tnCTZiBHylig860lw+wwBn+tFZb5SATG2W04JEXp7caOY?= =?us-ascii?Q?70U9oZf0z3kHItmOp5nyIxPEd00P9siD9MAZMpK7PptpyiGKE11wFmiHER0d?= =?us-ascii?Q?P2geGbd3CsQ5FwR3/DClyB5Air0JZ12P70FzZLbiSfvCt9FE8NVozjO9sMiy?= =?us-ascii?Q?vKUCps+8wz+gfS+6+piKLF4Kvi4fR9GjQAioeyT02iOViAGJSrfEPXzoTOze?= =?us-ascii?Q?lpB4yyIMtXDGcjUbK33GFOYu4+NduqTZ6letp1quJRbNAHHehMcbBrqyr3qj?= =?us-ascii?Q?Dnc6FXHjqoPFjdHKqDzUonW4d/zFhHjy4MGEc0bolv15dO/1VR0/qnMIBOCe?= =?us-ascii?Q?r2SHxv0YgtNP9wOCikeFuq0C1zT5Ezbh3bW4DAAEg/yteIxpGvN9yUKa7hgI?= =?us-ascii?Q?NhAERirrlgowgakK5n6ggkaDGTKiyYmkbRBFkeW13RK7kVvzuVKyspHs5qYa?= =?us-ascii?Q?K9Ln3k3DCiQkKq5AXI2Fv4j5yayJ62zzDVpLuPCh3dyQVINWqxXrcdqYe62V?= =?us-ascii?Q?k1agSRP/UO/5gptZxnP3Bp33r4SAOOtXhI+oZRfzXK3kgX3vNNaf929vyZSg?= =?us-ascii?Q?umS7/8s1CZf4qO3/dFZx3KA0qkz/3tb5+kjcEikX0EzjXd6Ay49zswIvHV5w?= =?us-ascii?Q?h+DtLHSuzSeNACcC8f8ryreLFSLj2NNDtd+XlsLd3NIZEpmG34wpVK5s3/su?= =?us-ascii?Q?TmHkDAV0Xf7hXre41k806h4I?= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR08MB6541 Original-Authentication-Results: sourceware.org; dkim=none (message not signed) header.d=none; sourceware.org; dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT005.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 41471571-bd97-4b6a-fdc7-08d8fe54b7c6 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: kQGlywbFG04DJy7D/yFh8FCI2+i3ein1znr15YZVS4RrUWXqaWqyDINHLsmnYhHy2L2K81xYQ3NmKozdTzx3VdKSI5FYyXEKDabrUF/bHmn9xSQXt8Yx8kpBctXQ6fjCAMpUBqMPt/vK0gHkRW/5FhHgWJBQdm5yQ6RcjM78Tilv4Ne/O1IV0PNf56/ojd9RfqsRPWwHKqnmvSedTzy8eMThNxQAd57UfQmRBB7ESdqUIRwr3uYkhxvUUHt3nuPG1AXTco38s9tzPUa1sahzDFAT5oH/KtzoBYl6nsVghhgmVE19J5du2zrIV+ax9iJikhcKWSlXzNv0O1iN1VAno4rkSr5ei7KmF3O/lG/on4MZujJYOM6dv2wKh6tZL+uArtvxJ4OXG3tQiAj4Rl/QPjcx+GaL1ix814KVoiFx5BuegSx6hXy84rQHbDbRE4Yk+xyWJuRekwWdnQEEKLYxKbey5i5kBojmeEzDyKjQRO6v0HJbFY9VLwTyL/aNR9BqNuoILMypi8Q3/filc2MLPYlLfZWJJZHETwnR1qdxL4KFfE0nfz2hFUeEifl+aYoH0epT2lYtoUmI3xOASFpHcWw+tQoOjkNuVei87/MxflvO+tXEP6uDA9fCaYIYaY6uB2WZAibYZq1r5zsxgjC1HhJqH4W2U3L8FlhsXDAXua+669HWdpIz9D6Drf7I05TFe9PN8THfyuH9t5q7CQr6M9SJveMEtuvle7yZGLDOgnlrVc7YP/eXTgV/XWgmoBt90kbvm2nJ5VQkzl7bW8Jaq3N8/IZUzB6gnaPeRKPsRL4= X-Forefront-Antispam-Report: CIP:63.35.35.123; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:64aa7808-outbound-1.mta.getcheckrecipient.com; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; CAT:NONE; SFS:(4636009)(396003)(136003)(39860400002)(346002)(376002)(36840700001)(46966006)(5660300002)(336012)(83380400001)(478600001)(16526019)(36756003)(8676002)(86362001)(6666004)(70206006)(6506007)(316002)(6916009)(81166007)(8936002)(6512007)(6486002)(2616005)(956004)(47076005)(69590400012)(186003)(26005)(2906002)(356005)(82740400003)(70586007)(44832011)(82310400003)(36860700001)(2004002); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Apr 2021 08:18:36.5435 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 47e463bf-09c8-4ba3-a517-08d8fe54bc88 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: VE1EUR03FT005.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR08MB5726 X-Spam-Status: No, score=-13.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, KAM_SHORT, MSGID_FROM_MTA_HEADER, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_PASS, TXREP, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org 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: , X-List-Received-Date: Tue, 13 Apr 2021 08:18:41 -0000 The test dlopens a large number of modules with TLS, they are reused from an existing test. The test relies on the reuse of slotinfo entries after dlclose, without bug 27135 fixed this needs a failing dlopen. With a slotinfo list that has non-monotone increasing generation counters, bug 27136 can trigger. -- v2: - moved from nptl/ to elf/ - dlopen a different set of existing modules. - code style fixes (!= NULL etc). - moved after bug fix patch --- elf/Makefile | 10 ++++- elf/tst-tls20.c | 98 ++++++++++++++++++++++++++++++++++++++++++ elf/tst-tls20mod-bad.c | 2 + 3 files changed, 109 insertions(+), 1 deletion(-) create mode 100644 elf/tst-tls20.c create mode 100644 elf/tst-tls20mod-bad.c diff --git a/elf/Makefile b/elf/Makefile index 0bef49e53d..b1344f1133 100644 --- a/elf/Makefile +++ b/elf/Makefile @@ -222,7 +222,8 @@ tests += restest1 preloadtest loadfail multiload origtest resolvfail \ tst-audit14 tst-audit15 tst-audit16 \ tst-single_threaded tst-single_threaded-pthread \ tst-tls-ie tst-tls-ie-dlmopen argv0test \ - tst-glibc-hwcaps tst-glibc-hwcaps-prepend tst-glibc-hwcaps-mask + tst-glibc-hwcaps tst-glibc-hwcaps-prepend tst-glibc-hwcaps-mask \ + tst-tls20 # reldep9 tests-internal += loadtest unload unload2 circleload1 \ neededtest neededtest2 neededtest3 neededtest4 \ @@ -344,6 +345,7 @@ modules-names = testobj1 testobj2 testobj3 testobj4 testobj5 testobj6 \ libmarkermod2-1 libmarkermod2-2 \ libmarkermod3-1 libmarkermod3-2 libmarkermod3-3 \ libmarkermod4-1 libmarkermod4-2 libmarkermod4-3 libmarkermod4-4 \ + tst-tls20mod-bad # Most modules build with _ISOMAC defined, but those filtered out # depend on internal headers. @@ -1924,3 +1926,9 @@ $(objpfx)tst-rtld-help.out: $(objpfx)ld.so fi; \ (exit $$status); \ $(evaluate-test) + +# Reuses tst-tls-many-dynamic-modules +tst-tls20mod-bad.so-no-z-defs = yes +$(objpfx)tst-tls20: $(libdl) $(shared-thread-library) +$(objpfx)tst-tls20.out: $(objpfx)tst-tls20mod-bad.so \ + $(tst-tls-many-dynamic-modules:%=$(objpfx)%.so) diff --git a/elf/tst-tls20.c b/elf/tst-tls20.c new file mode 100644 index 0000000000..a378c1fa08 --- /dev/null +++ b/elf/tst-tls20.c @@ -0,0 +1,98 @@ +/* Test dtv setup if entries don't have monotone increasing generation. + Copyright (C) 2021 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include +#include +#include +#include +#include +#include +#include + +#define NMOD 100 +static void *mod[NMOD]; + +static void +load_fail (void) +{ + /* Expected to fail because of a missing symbol. */ + void *m = dlopen ("tst-tls20mod-bad.so", RTLD_NOW); + if (m != NULL) + FAIL_EXIT1 ("dlopen of tst-tls20mod-bad.so succeeded\n"); +} + +static void +load_mod (int i) +{ + char buf[100]; + snprintf (buf, sizeof buf, "tst-tls-manydynamic%02dmod.so", i); + mod[i] = xdlopen (buf, RTLD_LAZY); +} + +static void +unload_mod (int i) +{ + if (mod[i] != NULL) + xdlclose (mod[i]); + mod[i] = NULL; +} + +static void +access (int i) +{ + char buf[100]; + snprintf (buf, sizeof buf, "tls_global_%02d", i); + dlerror (); + int *p = dlsym (mod[i], buf); + printf ("mod[%d]: &tls = %p\n", i, p); + if (p == NULL) + FAIL_EXIT1 ("dlsym failed: %s\n", dlerror ()); + ++*p; +} + +static void * +start (void *a) +{ + for (int i = 0; i < NMOD; i++) + if (mod[i] != NULL) + access (i); + return 0; +} + +static int +do_test (void) +{ + int i; + + for (i = 0; i < NMOD; i++) + { + load_mod (i); + /* Bump the generation of mod[0] without using new dtv slot. */ + unload_mod (0); + load_fail (); /* Ensure GL(dl_tls_dtv_gaps) is true: see bug 27135. */ + load_mod (0); + /* Access TLS in all loaded modules. */ + pthread_t t = xpthread_create (0, start, 0); + xpthread_join (t); + } + for (i = 0; i < NMOD; i++) + unload_mod (i); + return 0; +} + +#include diff --git a/elf/tst-tls20mod-bad.c b/elf/tst-tls20mod-bad.c new file mode 100644 index 0000000000..c1aed8ea7d --- /dev/null +++ b/elf/tst-tls20mod-bad.c @@ -0,0 +1,2 @@ +void missing_symbol (void); +void f (void) {missing_symbol ();} -- 2.17.1