From nobody Tue Apr 7 20:37:06 2026 X-Original-To: freebsd-current@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fqyfz2J0zz6YvXd for ; Tue, 07 Apr 2026 20:37:15 +0000 (UTC) (envelope-from paulf2718@gmail.com) Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fqyfy6vXZz3lRP for ; Tue, 07 Apr 2026 20:37:14 +0000 (UTC) (envelope-from paulf2718@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-4887f49ec5aso73230525e9.1 for ; Tue, 07 Apr 2026 13:37:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1775594229; x=1776199029; darn=freebsd.org; h=in-reply-to:from:content-language:references:cc:to:subject :user-agent:mime-version:date:message-id:from:to:cc:subject:date :message-id:reply-to; bh=E6pOVKMrThtb23gdhOtJ99ZAItkck5tMbkEhUWDs1zk=; b=ojJdNYjKhJRKVJcXSGlGDPEj10bHmsDY4o+fOI9HLSxLR+STzABKMX/MWcDHfnK5vs nNbaXBxm5kJPWfukhLRSzyzGdkz6HECIYMlGFsyUD1/TNWKva45DlBIG7gmkxyUxzO4a RxCfUksBoYjiLuGHuwwNRfOvubPp2HkbdltqtPlDpmXQRtPsMLtE0/9MJW2XmysR70dq Yv8XegEZbLEo4wD25Q01iCp2d0PI2j5PR8ESylbWbf9Gh26MmtJrUVw2c63CZKhMv5fh a4SPNtPcCliEd5QLaAkbtABpzN6X1DIVTXzwjEpXUBorbxhPnSvcY8r8Hd/Mwzr/Yv1n EmcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775594229; x=1776199029; h=in-reply-to:from:content-language:references:cc:to:subject :user-agent:mime-version:date:message-id:x-gm-gg:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=E6pOVKMrThtb23gdhOtJ99ZAItkck5tMbkEhUWDs1zk=; b=r+fkrFoalGc1OvajxYGc5j8Ob5SdIcvkpj3Blyq52p6OvTNToTYAWyjIgXCx9+dppM abAkvE9UOBJNi7aFdyujg8d1S5y+o0Sm308o5o6hhboD5aZUDkVbggd6S6PpBsrUXjPw m9kCOhmbvdQlPA0yplT5rXy9rdfVXunWSfi6GBsWmUZrxy/YywdBxBO0sG0BupGu3kmL rsV86eA/3rG9YQt2VsxPuADtL6BJQKxxxHmo2cLWpB4r9nYn/EMvc+FyEUPf3zhokHfO gpoBl8syqyk7uks9BoNXF/piGRGJKCEzSnG8aOivtumXppEy2fSOP6XXNzSOWmNDrEWI vz3Q== X-Forwarded-Encrypted: i=1; AJvYcCUZyZ0jtWX+et9P6roXGgPOohMzd/EGaUj6XcAPCiVcrI9OCuK1xLDhViPuwVIPQhBaiYujCL3hJmiTrreAxVQ=@freebsd.org X-Gm-Message-State: AOJu0YwBZZjCv/4pm97wE1A1YgdY5nnZsJp6PMLnLr97y3B4EUu3hdJd MancVnwfA40dGU9NTaibevXBfend4IXXMnyWViWj7KBVqKQy2xalSorQfwh689qVJEw= X-Gm-Gg: AeBDietBFC7arKljuaLr5eF3AeGDlX13kEG+PRmWZDrcg9FZIYrhqqbQekTqjerBI4T dfsgoUth2mN1w4nG05n3dN013DrWP9dQm7s9Rb5Xu3MTfB2VX5NnC0vT+ZrfKHwGOiW7nyjGBfh bhYjQBzyul0K5fu5EvvTLPE46zUoxeuGUEs1W/r5fet98Bfxi1hipF/e6QqjGo8fh2NwzShGRx9 cx28f60z2j7Hqa+TM4YzRdLq4s8EEiArY2dOvCVECLXVtxg+M2K9YaG4SBvuWEYLCI5lq66vB90 ysaZte9/eecjXgjgMAzyIqC2XgSbHs/t4LUNBj39DlacpBielF5v1iwQzhXzDB8RAqtx83bqHHn 1VQh0yyJUby/mCvICMkkqaZssgNfGDhW9gMmo8vaiKBZ0t11FBhzXInN0IdQFwMYZlTk/YcuLgR wvtz3OGfkrb3LGXWbicmYs/4COy/NrYXk0AZ38YcyLLyRgEO/uP2lfgE/7lkLUWEBLIcsaWOy/3 aFI1LVIu+w= X-Received: by 2002:a05:600c:1553:b0:488:acbc:b2e with SMTP id 5b1f17b1804b1-488acbc0ca8mr139516655e9.17.1775594228490; Tue, 07 Apr 2026 13:37:08 -0700 (PDT) Received: from ?IPV6:2a01:cb15:8545:7700:62cf:84ff:fe81:caec? ([2a01:cb15:8545:7700:62cf:84ff:fe81:caec]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-488c5dac41fsm1759125e9.21.2026.04.07.13.37.06 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 07 Apr 2026 13:37:07 -0700 (PDT) Content-Type: multipart/alternative; boundary="------------z5V7mAZaX5NZQABX07nVtlNI" Message-ID: <5de1cac2-8480-4d39-a2a6-dc882a65ba79@gmail.com> Date: Tue, 7 Apr 2026 22:37:06 +0200 List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: debug files now have program headers To: Ed Maste , Gleb Popov Cc: Dimitry Andric , "freebsd-current@freebsd.org" References: <707b0fa7-b345-4802-a018-d6050f4e8f8c@gmail.com> <4DDACD68-1AF2-4502-AF20-4EAB15B13659@FreeBSD.org> Content-Language: en-US From: Paul Floyd In-Reply-To: X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] X-Rspamd-Queue-Id: 4fqyfy6vXZz3lRP X-Spamd-Bar: ---- This is a multi-part message in MIME format. --------------z5V7mAZaX5NZQABX07nVtlNI Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 2026-04-07 18:12, Ed Maste wrote: > Yes, it should be LLVM_BINUTILS_BOOTSTRAP that's responsible, not > LLVM_BINUTILS. The former is only in main while LLVM_BINUTILS is also > in stable/15. The changes to support LLVM_BINUTILS BOOTSTRAP were > missing from the original LLVM_BINUTILS work; it was not intentional > that we continued to use ELF Tool Chain tools for the bootstrap. > > We discovered this because another tool (i.e., libabigail) failed when > the standalone debug files _lacked_ program headers, and I believe > this is the expected state in the GNU tool / Linux distro world. I > presume Valgrind on Linux handles this somehow? Hi Ed I suspect that this is the first time that that this has been observed. That means that Valgrind on Linux probably has the same problem. This issue will need fixing. Very briefly, the issue is caused in the code that runs only with -v -v or more that will print something like ==61545== Adding active redirection: --61545--     new: 0x7ff80cb94c65 (operator new(unsigne) R-> (1003.0) 0x100181f50 operator new(unsigned long, std::align_val_t) at that point in the code it only has the function addresses, so it calls some functions to look up the names. That is quite involved. On the way it will call is_elf_object_file_by_DiImage [Di = Debuginfo]. That just looks at the ELF header. Previously it returned false as there was no program header in the split debug files. Now it is returning true. I think that the fix will be to add a further check for a non-zero sized PT_DYNAMIC segment. is_elf_object_file_by_DiImage is used in several places so I have to make sure that there are no bad side effects. Regards Paul --------------z5V7mAZaX5NZQABX07nVtlNI Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit


On 2026-04-07 18:12, Ed Maste wrote:
Yes, it should be LLVM_BINUTILS_BOOTSTRAP that's responsible, not
LLVM_BINUTILS. The former is only in main while LLVM_BINUTILS is also
in stable/15. The changes to support LLVM_BINUTILS BOOTSTRAP were
missing from the original LLVM_BINUTILS work; it was not intentional
that we continued to use ELF Tool Chain tools for the bootstrap.

We discovered this because another tool (i.e., libabigail) failed when
the standalone debug files _lacked_ program headers, and I believe
this is the expected state in the GNU tool / Linux distro world. I
presume Valgrind on Linux handles this somehow?

Hi Ed

I suspect that this is the first time that that this has been observed. That means that Valgrind on Linux probably has the same problem.

This issue will need fixing. 

Very briefly, the issue is caused in the code that runs only with -v -v or more that will print something like

==61545== Adding active redirection:
--61545--     new: 0x7ff80cb94c65 (operator new(unsigne) R-> (1003.0) 0x100181f50 operator new(unsigned long, std::align_val_t)

at that point in the code it only has the function addresses, so it calls some functions to look up the names. That is quite involved. On the way it will call is_elf_object_file_by_DiImage [Di = Debuginfo]. That just looks at the ELF header. Previously it returned false as there was no program header in the split debug files. Now it is returning true.

I think that the fix will be to add a further check for a non-zero sized PT_DYNAMIC segment. is_elf_object_file_by_DiImage is used in several places so I have to make sure that there are no bad side effects.

Regards

Paul


--------------z5V7mAZaX5NZQABX07nVtlNI--