[SRU] dpkg: backport frame-pointer enabling mechanism for Rust
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
dpkg (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Noble |
Fix Committed
|
Undecided
|
Zixing Liu |
Bug Description
[ Impact ]
* On Noble, dpkg scripts could not produce Rust binaries with frame-pointer enabled.
[ Test Plan ]
* Build a Rust binary package like ripgrep and you will not find frame-pointers being used in the binary.
* Since LLVM could inline and choose to optimize frame pointers away in some cases, you will need to check the disassembly of the program around the function prologue to see if the frame pointer register is correctly saved to stack (rbp/ebp on x86 architecture). You can use the script provided in https:/
[ Where problems could occur ]
* On older Rust versions (Rust <= 1.80), it is known that LLVM on s390x sometimes can produce incorrect warnings about how the "backchain" feature does not exist.
* On older LLVM versions (LLVM <= 17), LLVM may not produce correct backchain saving logic inside the function prologue.
[ Other Info ]
* This change is mandatory to enable Rust-related packages with frame-pointers during the build.
Related branches
- Steve Langasek (community): Approve
- Benjamin Drung (community): Needs Fixing
-
Diff: 125 lines (+44/-0)6 files modifieddebian/changelog (+13/-0)
man/dpkg-buildflags.pod (+10/-0)
scripts/Dpkg/BuildFlags.pm (+2/-0)
scripts/Dpkg/Vendor/Ubuntu.pm (+13/-0)
scripts/mk/buildflags.mk (+4/-0)
scripts/t/mk/buildflags.mk (+2/-0)
description: | updated |
description: | updated |
Changed in dpkg (Ubuntu Noble): | |
assignee: | nobody → Zixing Liu (liushuyu-011) |
> * Since LLVM could inline and choose to optimize frame pointers away in some cases, you will need to check the disassembly of the program around the function prologue to see if the frame pointer register is correctly saved to stack (rbp/ebp on x86 architecture).
This is incomplete as an SRU test case; it does not tell a random developer what steps to follow to verify the SRU's correctness. Please flesh this out.