Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 937402 - dev-util/bpftool: miscompiles (arguably wrong) code when built with clang/llvm-17+
Summary: dev-util/bpftool: miscompiles (arguably wrong) code when built with clang/llv...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Holger Hoffstätte
URL: https://git.kernel.org/pub/scm/linux/...
Whiteboard:
Keywords: PullRequest
Depends on: 937403
Blocks: 915000
  Show dependency tree
 
Reported: 2024-08-05 18:15 UTC by Holger Hoffstätte
Modified: 2024-08-06 11:13 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Holger Hoffstätte 2024-08-05 18:15:16 UTC
See $URL. Basically llvm taking people by their word and silently optimising away mutations to a const struct.


Reproducible: Always

Steps to Reproduce:
1. build bpftool with clang-17 or -18
2. inspect resulting code
3. it's wrong
Actual Results:  
Broken code

Expected Results:  
Working code

This is fixed in kernel-6.10.3.
Comment 1 Larry the Git Cow gentoo-dev 2024-08-06 10:16:54 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0f0a37b4e11c414c39c18a7fbc53e7a0e9503ce2

commit 0f0a37b4e11c414c39c18a7fbc53e7a0e9503ce2
Author:     Holger Hoffstätte <holger@applied-asynchrony.com>
AuthorDate: 2024-08-05 18:49:36 +0000
Commit:     Guilherme Amadio <amadio@gentoo.org>
CommitDate: 2024-08-06 10:15:43 +0000

    dev-util/bpftool: fix miscompilation with clang & correctly apply patches
    
    Closes: https://bugs.gentoo.org/937402
    Closes: https://bugs.gentoo.org/937403
    
    Signed-off-by: Holger Hoffstätte <holger@applied-asynchrony.com>
    Signed-off-by: Guilherme Amadio <amadio@gentoo.org>

 dev-util/bpftool/bpftool-7.5.0-r1.ebuild | 127 +++++++++++++++++++++++++++++++
 1 file changed, 127 insertions(+)