From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id +beRGFL3hWnc9SsAWB0awg (envelope-from ) for ; Fri, 06 Feb 2026 09:14:42 -0500 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=BzqVtGsR; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 5638F1E0BA; Fri, 06 Feb 2026 09:14:42 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED,RDNS_NONE autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (unknown [38.145.34.32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 980701E08D for ; Fri, 06 Feb 2026 09:14:41 -0500 (EST) Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id 3049F43AEC21 for ; Fri, 6 Feb 2026 14:14:41 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3049F43AEC21 Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=BzqVtGsR Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTP id 0448543AEC21 for ; Fri, 6 Feb 2026 14:14:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0448543AEC21 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 0448543AEC21 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1770387256; cv=none; b=s6O10XxZC8Z0BJWNPDIDgcXPpM4+7205Uytc7o6UXL+qZUzgGn7AH56eN98XtEJycsZ7D5rnOP2js6Re2+f+PyYt01S1w8Y10a3PCBSR5w/JsbEi4GL/16EnUXzIjRwOX6ECFS4EqH8FwGmfQkUXgayUAcqddBj1r4iwnIOg+Dg= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1770387256; c=relaxed/simple; bh=Z9BGGuKAcAbY3iCm47aOuZuq90XLS7isuaxNGk1fNVc=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=f9JTyWbp9glbtzVvGjZ+pPch2wl13gQ45LEX4VP6im+brOXkXr13Y1owle4NdDThK3TzlNtF09taS60m904yKAhzRZ5Bp0QbXvqCnKJ1D1OGBP0UcelxJNgZGiZGEFwjL3Z0jMsGWaUpxx4MOBzAY2MQMyj8IA+oHsaW7MKKazs= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0448543AEC21 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1770387255; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=8lTQZFHkAiFPr/hwGtkKTE7D+jAaejypM3E5M1fwxD4=; b=BzqVtGsRACZf8o9oF8ntEM+3UEoMsvxkLTES1mbYfXuEdOf8Ro6RnaqiQnIqTZWxnjVu1r ezWRhv35K77u5bwxnECauH+J8otHO6HTDH1U6TWDhP4xqc5hpdncXKpaCs5t36k8DZs5dn kB8LSfjmQnWmh0GxBCSzTL7YY385g8w= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-464-sKhRVdTCMva8SHmR3N0wqA-1; Fri, 06 Feb 2026 09:14:14 -0500 X-MC-Unique: sKhRVdTCMva8SHmR3N0wqA-1 X-Mimecast-MFC-AGG-ID: sKhRVdTCMva8SHmR3N0wqA_1770387253 Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-4806fa4a180so6383555e9.2 for ; Fri, 06 Feb 2026 06:14:14 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770387253; x=1770992053; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=8lTQZFHkAiFPr/hwGtkKTE7D+jAaejypM3E5M1fwxD4=; b=Me4N6ObU9HfBfQw8kM9I6PWbIXXRPDcD93viuACUyiS/iv/0akusdsFhztCuOYbwMQ DeNeMpW2qRbiKWpDbcJc3/YCcHHA7EGNLT1R93O0tIWP8Cu/ip7QkVftQ6vetr9IUrQM PdhlJERTJYNs8/Qp7P+9wJL+WwC1LpYl4kMHXD2fLBpgWTCx7xbAZF+d8foXATwOL8a6 oLGWKxnPkTGcbfSzZswo67yEtRtVHkRU+MvqhNPG8mqgFCax00Kpuke/gBshjEsdUA/f dzXAIgDeeHyyf4ZNfo+3l77bJw6W/JAQbj7DvoqLCcqdSeA+9X9AZQMo0QRW85HQR68O Cveg== X-Forwarded-Encrypted: i=1; AJvYcCWjtqzY6aZ3ixLFhDJgumgivU+3axAR1ERJI/xHDQHd2x/J5fX2l6Fvdg1vtRNulvhVQeparh6wK2r9uQ==@sourceware.org X-Gm-Message-State: AOJu0YxvtneuorBlvMs7mEE+s9FJj7bhuH8M4V9PpvilKLC3hHDFpuDa DWytfjx8Qf3fhEHJibbk/TC+GNap2MZcFOh0HN4D6bTvd6zTnBZRwB9WBcoy8FfXpH3jBP59X2b GDKQvDmCgs0Gn128Uy9nz3qzoWSg+cco3LOKQeHcvU2BXktGoR8Qd86Maf3MoVrE= X-Gm-Gg: AZuq6aJ/mCTN1NETGSPJIjnKaLg2FQZILgCfa0e6RswVksRiLEHPYnMWSiiCTGOZxJ0 Znb6RgmW1EkHhAInopq/0qXcYqqJiwbcLf5r10B06In0+HxhIgu9FDR4GtXxk9De1jgRnf7NxLo husQJM73vvdX7P7m1+rEn+uOzpNrPg+QtLE+oGHcpdIee+0hLZBKSt42wBAebTA+47Zgex8LdBG jQvQfVy4OQiYodWZx5uHrSBW3osTPNO2knXJsjSQt84Kn/xJbsTkLBaVnI7tWgY+EqZI03zkoEj tx575g+u5YjKKA3eEuFWD+oHuc4a/jf4l5leNbgOvWKXn8Ouwl983so8HW8UkOig9U7oBiceDxO UPSzL X-Received: by 2002:a05:600c:524a:b0:47a:94fc:d057 with SMTP id 5b1f17b1804b1-483201da912mr41633295e9.2.1770387253306; Fri, 06 Feb 2026 06:14:13 -0800 (PST) X-Received: by 2002:a05:600c:524a:b0:47a:94fc:d057 with SMTP id 5b1f17b1804b1-483201da912mr41632955e9.2.1770387252882; Fri, 06 Feb 2026 06:14:12 -0800 (PST) Received: from localhost ([31.111.84.232]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-483209c6de6sm18955105e9.13.2026.02.06.06.14.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Feb 2026 06:14:12 -0800 (PST) From: Andrew Burgess To: Simon Marchi , gdb-patches@sourceware.org Cc: Luis , Simon Marchi Subject: Re: [PATCH] gdb/testsuite: make gdb.dwarf2/dw2-empty-inline-ranges.exp work when ASLR can't be disabled In-Reply-To: <20260205204257.422150-1-simon.marchi@efficios.com> References: <20260205204257.422150-1-simon.marchi@efficios.com> Date: Fri, 06 Feb 2026 14:14:11 +0000 Message-ID: <87bji2dkng.fsf@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: s5LPKu23ix7lb8aNzoCwyYtRYh57KMsM6KPvR6tBxH4_1770387253 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org Simon Marchi writes: > A colleague that goes by the name "Luis Machado" reported a failure when > running gdb.dwarf2/dw2-empty-inline-ranges.exp. After investigation, we > found that the conditions for the test to fail are: > > - running in an environment where GDB can't disable address space > randomization (such as in a container where that capability is > removed) > > - a toolchain generating position-independent executables > > The test does a first run to grab the addresses of a few labels defined > in the source file. It then crafts the DWARF using these addresses. > And then it does a second run for the actual test stuff. > > When the executable is PIE and ASLR is active, then the addresses in > both runs don't agree, which the test doesn't expect. > > It is possible to emulate the failure by inserting some: > > gdb_test_no_output "set disable-randomization off" > > after both "prepare_for_testing" calls. The (first) failure then > manifests as: > > FAIL: gdb.dwarf2/dw2-empty-inline-ranges.exp: dwarf_version=4: empty_loc=start: entry_pc_type=empty: stopped at entry-pc > > This test compares the expected stop PC "entry_pc" with the actual stop > PC "pc". In my example run, they were indeed different: > > pc = 0x5603ec67a159 > entry_pc = 0x55baba6a9159 > > The simplest way to fix this, which this patch implements, is to use > "nopie" when building the binaries. I don't think this affects the > effectiveness of the test. > > Also, in the first run, it is longer necessary to run the inferior > before grabbing the addresses, they are going to be the same with a > non-PIE executable. So remove that. Thanks for fixing this. LGTM. Approved-By: Andrew Burgess Thanks, Andrew