[Bug 2082636] Re: [SRU] dpkg: backport frame-pointer enabling mechanism for Rust

Zixing Liu 2082636 at bugs.launchpad.net
Thu Sep 11 14:20:10 UTC 2025


> wget https://launchpad.net/~canonical-foundations/+archive/ubuntu/archive-bootstrap/+files/ripgrep_14.1.0-1_amd64.deb
--2025-09-11 22:03:49--  https://launchpad.net/~canonical-foundations/+archive/ubuntu/archive-bootstrap/+files/ripgrep_14.1.0-1_amd64.deb
Loaded CA certificate '/etc/ssl/certs/ca-certificates.crt'
Resolving launchpad.net (launchpad.net)... 2620:2d:4000:1009::3ba, 2620:2d:4000:1009::f3, 185.125.189.222, ...
Connecting to launchpad.net (launchpad.net)|2620:2d:4000:1009::3ba|:443... connected.
HTTP request sent, awaiting response... 303 See Other
Location: https://launchpadlibrarian.net/772222776/ripgrep_14.1.0-1_amd64.deb [following]
--2025-09-11 22:03:54--  https://launchpadlibrarian.net/772222776/ripgrep_14.1.0-1_amd64.deb
Resolving launchpadlibrarian.net (launchpadlibrarian.net)... 2620:2d:4000:1009::3b8, 2620:2d:4000:1009::13e, 185.125.189.228, ...
Connecting to launchpadlibrarian.net (launchpadlibrarian.net)|2620:2d:4000:1009::3b8|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1549068 (1.5M) [application/x-debian-package]
Saving to: ‘ripgrep_14.1.0-1_amd64.deb’

ripgrep_14.1.0-1_amd64.deb
100%[====================================================================================================>]
1.48M  33.7KB/s    in 58s

2025-09-11 22:05:02 (26.0 KB/s) - ‘ripgrep_14.1.0-1_amd64.deb’ saved
[1549068/1549068]

> dpkg -x ripgrep_14.1.0-1_amd64.deb ripgrep
> find ripgrep -executable -type f -print -exec 'python3' 'check-rust-fp.py' '{}' ';'
ripgrep/usr/bin/rg
Total symbols: 6524, frame pointer enabled: 5876

Compare to rustup (which does not have frame pointer enabled):
wget https://launchpad.net/ubuntu/+source/rustup/1.26.0-5build1/+build/27998654/+files/rustup_1.26.0-5build1_amd64.deb
--2025-09-11 22:17:16--  https://launchpad.net/ubuntu/+source/rustup/1.26.0-5build1/+build/27998654/+files/rustup_1.26.0-5build1_amd64.deb
Loaded CA certificate '/etc/ssl/certs/ca-certificates.crt'
Resolving launchpad.net (launchpad.net)... 2620:2d:4000:1009::3ba, 2620:2d:4000:1009::f3, 185.125.189.222, ...
Connecting to launchpad.net (launchpad.net)|2620:2d:4000:1009::3ba|:443... connected.
HTTP request sent, awaiting response... 303 See Other
Location: https://launchpadlibrarian.net/722440794/rustup_1.26.0-5build1_amd64.deb [following]
--2025-09-11 22:17:20--  https://launchpadlibrarian.net/722440794/rustup_1.26.0-5build1_amd64.deb
Resolving launchpadlibrarian.net (launchpadlibrarian.net)... 2620:2d:4000:1009::3b8, 2620:2d:4000:1009::13e, 185.125.189.228, ...
Connecting to launchpadlibrarian.net (launchpadlibrarian.net)|2620:2d:4000:1009::3b8|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2331030 (2.2M) [application/x-debian-package]
Saving to: ‘rustup_1.26.0-5build1_amd64.deb’

rustup_1.26.0-5build1_amd64.deb
100%[====================================================================================================>]
2.22M   954KB/s    in 2.4s

2025-09-11 22:17:26 (954 KB/s) - ‘rustup_1.26.0-5build1_amd64.deb’ saved
[2331030/2331030]

> dpkg -x rustup_1.26.0-5build1_amd64.deb rustup
> find rustup -executable -type f -print -exec 'python3' 'check-rust-fp.py' '{}' ';'
rustup/usr/bin/rustup
Total symbols: 4934, frame pointer enabled: 34

-- 
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:
  Fix Released
Status in dpkg source package in Noble:
  Fix Committed

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 (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.

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