[Bug 2082636] Re: [SRU] dpkg: backport frame-pointer enabling mechanism for Rust
Zixing Liu
2082636 at bugs.launchpad.net
Mon Nov 25 23:19:33 UTC 2024
I have attached a script to detect if frame pointers have been enabled
for the binary.
If one or two symbols are not enabled, that's fine, and that might be a
false-positive due to the script not handling some complicated DWARF
operations (DWARF is a Turing-complete descriptor language).
** Attachment added: "check-rust-fp.py"
https://bugs.launchpad.net/ubuntu/+source/dpkg/+bug/2082636/+attachment/5840384/+files/check-rust-fp.py
** Changed in: dpkg (Ubuntu)
Status: Incomplete => New
** Description changed:
[ 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).
+ * 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://bugs.launchpad.net/ubuntu/+source/dpkg/+bug/2082636/+attachment/5840384/+files/check-rust-fp.py to check if the frame pointers have been enabled.
[ Where problems could occur ]
* On older Rust versions, 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 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.
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to dpkg in Ubuntu.
https://bugs.launchpad.net/bugs/2082636
Title:
[SRU] dpkg: backport frame-pointer enabling mechanism for Rust
Status in dpkg package in Ubuntu:
New
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://bugs.launchpad.net/ubuntu/+source/dpkg/+bug/2082636/+attachment/5840384/+files/check-rust-fp.py to check if the frame pointers have been enabled.
[ Where problems could occur ]
* On older Rust versions, 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 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.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/dpkg/+bug/2082636/+subscriptions
More information about the foundations-bugs
mailing list