From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id SvZFDOHBn2p+iTYAWB0awg (envelope-from ) for ; Tue, 08 Sep 2026 04:05:53 -0400 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=RgK8gIHc; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 1E9C61E09E; Tue, 08 Sep 2026 04:05:53 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-6.4 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 autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [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 754511E091 for ; Tue, 08 Sep 2026 04:05:52 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 2CED54B920DD for ; Tue, 8 Sep 2026 08:05:51 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2CED54B920DD 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=RgK8gIHc 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 88AD94BB1C2C for ; Tue, 8 Sep 2026 08:05:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 88AD94BB1C2C 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 88AD94BB1C2C Authentication-Results: sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1788854728; cv=none; b=KlkYIY1WD6m6ibTzkQoFopJGupRldMAHkxJa4pL5yzr6Nxuk1K4CT4wjHCvngZdZ25GVAo5ad1+Wmp/irNdUQntj/BFNwct9XsypkRYvsdlRA0one0L53Uu5n6YfLAx9SbBrRY7ZaHUlSclgIuKxylZisaNUYxAXkLEdnK04niU= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1788854728; c=relaxed/simple; bh=vXF6NBbcBmXWT+3VKSWf/Y0ILxxzb/zCxN7X4B5w5AQ=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=HV5JjBFAY7uKNlpuqaxZ0ql8g3rhLYHUsXOVYP9dca8YEwX4fzi/OwhBtKxj/JLpERY6t6R2GfPaC5JeD1kR5VEDo+739yx3u/lfAeE6MO0D/lCEPioD4AferO3IfDw6we96U7c7K7GKE8Bszdr3rUyfWbt1kzNAoWNIKKQcrtM= ARC-Authentication-Results: i=1; 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=RgK8gIHc DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 88AD94BB1C2C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1788854728; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=QZqZzr8AmvbjCXAVrJRghUegMcvqYL2cY84ARzo5gZ0=; b=RgK8gIHcgTo9NS661N+s5GGOebSXnJVL3m5WorzfpmWxyqjI6pjUDbp5ma82eBrXCffL3h bCrFPnH54TmICeXtx8k2R/gJ4IEtmnuCtU4Uv9X8XaL1mQbFdQRhtSEIwv8hxkYynHTtHT M3fhpExmxmEnGrlg2ng/2byCVijBd48= Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-78-v3LEDn6gN92cl7kqcm1fLg-1; Tue, 08 Sep 2026 04:05:26 -0400 X-MC-Unique: v3LEDn6gN92cl7kqcm1fLg-1 X-Mimecast-MFC-AGG-ID: v3LEDn6gN92cl7kqcm1fLg_1788854725 Received: by mail-wr1-f70.google.com with SMTP id ffacd0b85a97d-4843e59c32dso2779134f8f.3 for ; Tue, 08 Sep 2026 01:05:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1788854725; x=1789459525; h=content-type:mime-version:message-id:date:references:in-reply-to :subject:to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=QZqZzr8AmvbjCXAVrJRghUegMcvqYL2cY84ARzo5gZ0=; b=aHXL/r7oYnt1FKv3NBpy9bRfC6+ypncgjtTAsHsmWvBM/jbm+oPsyn8EKlzO5lToPb 1DyGjpLt+dez0muBs9ujCghv5TJlGjcOuxzzwSaNy77O6xikTqtrhnKpS2Ft//jVWtHO KfHv7RXySlgqUibYa/qTR1pxujl0O4rMVZo5aHY2xb4jlcdFwpjEvwVxqEmXgcySme8E MEZ3o/yAW/EIWeQprj5xzBH8OHJBwDPR9t7fkXzwET/Kf6MsXXLZGqWfQCEFyetVm+Fn rEaoa7Lg3suRKa0oBjs63W4Qk6Lsovio8qzU2r2Afd15WnfSQaOv1trKZc8411e9c7Xe 2ymg== X-Forwarded-Encrypted: i=1; AKwUvBzrU4n8Pn1E1dlUXXqv4BAcco/xC88vyNTQcGNbJMbIpVOh39gBS9ADUn1Ajp6gY/GRdKQr3I4sLrMwfQ==@sourceware.org X-Gm-Message-State: AFuF++kqK5lUtXeqnN3k21HmB4eYaYlnO6JvE0aYw27nlUOg/n4lBX8/ dQtqoxhYq5DW4VxQWsbZtZT2vhqA6azALlMiOjdSGTCWZrfsErfdnRdnO3W0HtpyZYZ3ggsSi8r QxCP/wUIZHqG6I89eKJzhBXOnP76HMgg9w/4C8WbU8/yNwHc7cKCJIOabpg1Am94eoMd0E4s= X-Gm-Gg: AYBFou3orwwXRBtLdV6KLRZodgJArA7yAsVdWyTqpwG8JQSTehg5kQqyiMFjZ2Sn9TK 8FF2a+SEPjJwMgFsfkYMZpFrLqBKB3MFufV9RtZOxEPvsQL+XN15GFqwIoZnrLRhc7i5GQSXy6u 2u0x+9mwPhfsYZBGdN25wZ56K78BVqj+xTyvx+tbIc66oeOky93Kjis9f1E7mIF/SohhpFJGyKQ YIxdZgQKe7Fby7La59y34LpeOUNRafrS2Y6mGZnPgNlTs7mQNV0CY84hu9/m9lXqe0iE0bQrGnP u/eYa3GZsw1p2XErbXMlROnaPjIp1olqVwGFQRao59gVXLhlljc+dbd6R7/qH7sF4LqhYinA4qV VFhb9tymQ5y3zW7LtzC6cDtgBNdg= X-Received: by 2002:a05:6000:288e:b0:485:8c16:a33f with SMTP id ffacd0b85a97d-4858c16a5d0mr24974021f8f.52.1788854724802; Tue, 08 Sep 2026 01:05:24 -0700 (PDT) X-Received: by 2002:a05:6000:288e:b0:485:8c16:a33f with SMTP id ffacd0b85a97d-4858c16a5d0mr24973966f8f.52.1788854724233; Tue, 08 Sep 2026 01:05:24 -0700 (PDT) Received: from localhost (246.223.159.143.dyn.plus.net. [143.159.223.246]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-485885bf3f0sm38033439f8f.33.2026.09.08.01.05.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Sep 2026 01:05:23 -0700 (PDT) From: Andrew Burgess To: Abhay Kandpal , gdb-patches@sourceware.org Subject: Re: [PATCH] gdb: fix incorrect search domain in find_function_in_inferior In-Reply-To: <5b67f287-42f8-4ac9-956b-b0a1b1527009@linux.ibm.com> References: <5b67f287-42f8-4ac9-956b-b0a1b1527009@linux.ibm.com> Date: Tue, 08 Sep 2026 09:05:22 +0100 Message-ID: <87a4psqibh.fsf@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: kaw7TibHGGDCZ1ftQ3gMZCP_ZX6kOkAC5e0lmytj780_1788854725 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 Abhay Kandpal writes: > Hi Andrew, > > I think this commit causes two regressions on powerpc64le-linux, > still present on current master (e0d8f6fc386): > > FAIL: gdb.compile/compile.exp: expect no 5 > FAIL: gdb.compile/compile-cplus.exp: expect 5 > > I bisected these to 32090b27e92cb8fd4998e8e8e65d43f445545bc7. They > reproduce on two machines here, one Fedora 43 and one Fedora 44. > > Both tests check that the memory used by an injected module is released > after the compile command finishes. After this commit it is not. > > Before the commit, with "set debug compile on": > > allocated 0x5f0 bytes at 0x7ffff7f30000 prot 5 > allocated 0x10 bytes at 0x7ffff7db0000 prot 3 > allocated 0x34 bytes at 0x7ffff7da0000 prot 1 > allocated 0x8 bytes at 0x7ffff7d90000 for registers > > and none of those addresses appear in "info proc mappings" once the > command has finished. After this commit they are still mapped, > for example: > (gdb) p intptr > $1 = (int *) 0x7ffff7db0000 > > 0x00007ffff7db0000 0x00007ffff7dc0000 0x10000 0x0 rw-p > > so "p *intptr" still reads 5 from the module's memory, which is what the > tests check against. > > That memory is released by munmap_list::~munmap_list in > compile/compile-object-load.c, which calls gdbarch_infcall_munmap. On > > Linux that is linux_infcall_munmap (linux-tdep.c:2960), which looks up > "munmap" with find_function_in_inferior. The destructor discards any > exception, so a failure there would be silent. > > The allocations themselves still work, and linux_infcall_mmap looks up > "mmap64" through the same function, so whatever changed seems to affect > the lookup of "munmap" but not "mmap64". > > Since GDB 18.1 is due on the 11th, I thought it was worth flagging now. Thanks, I will investigate these, but the good news is that 32090b27e92cb8fd4998e8e8e65d43f445545bc7 is not on the gdb-18-branch. You can confirm this with: $ git branch -a --contains 32090b27e92cb8fd4998e8e8e65d43f445545bc7 | grep -e "gdb-.*-branch" which will return no hits. But I'll still be looking into what is happening here. Thanks, Andrew