Live data from Hacker News

Ubuntu 24.04 LTS will enable frame pointers by default

ubuntu.com

1–10 of 121 posts

Re: Ubuntu 24.04 LTS will enable frame pointers by default

#4
Call stack > Structure > Stack and Frame pointers: https://en.wikipedia.org/wiki/Call_stack#Stack_and_frame_poi...

What do the Coding Guidelines listed in e.g. awesome-safety-critical say about Frame pointers? https://awesome-safety-critical.readthedocs.io/en/latest/#co...

(Edit)

/? "cert" "frame pointer" https://www.google.com/search?q=%22cert%22+%22frame+pointer%... :

- Stack buffer overflow > Exploiting stack buffer overflows: https://en.m.wikipedia.org/wiki/Stack_buffer_overflow :

> In figure C above, when an argument larger than 11 bytes is supplied on the command line foo() overwrites local stack data, the saved frame pointer, and most importantly, the return address

What about the Top 25?

/? site:cwe.mitre.org "frame pointer" https://www.google.com/search?q=site%3Acwe.mitre.org+%22fram... :

- CWE-121: Stack-based Buffer Overflow https://cwe.mitre.org/data/definitions/121.html

This is closer to a better approach for security, debuggability, and performance IMHO:

https://news.ycombinator.com/item?id=38138010 :

> gdb on Fedora auto-installs signed debuginfo packages with debug symbols; Fedora hosts a debuginfod server for their packages (which are built by Koji) and sets `DEBUGINFOD_URLS=`

> Without debug symbols, a debugger has to read unlabeled ASM instructions (or VM opcodes (or an LL IR)).

Re: Ubuntu 24.04 LTS will enable frame pointers by default

#6
post #2

Frame pointers are such a destructive micro-optimization to omit by default, I am beyond excited about this collaboration with the folks at Canonical to make Ubuntu debuggable by default!

This option was almost certainly a holdover from the bad old 32-bit x86 days, when disabling frame pointers gave you a seventh valuable general-purpose register. It's no longer beneficial on x86_64 -- even with rbp locked down, you still have fourteen registers there.

Re: Ubuntu 24.04 LTS will enable frame pointers by default

#7
post #6
post #2

Frame pointers are such a destructive micro-optimization to omit by default, I am beyond excited about this collaboration with the folks at Canonical to make Ubuntu debuggable by default!

This option was almost certainly a holdover from the bad old 32-bit x86 days, when disabling frame pointers gave you a seventh valuable general-purpose register. It's no longer beneficial on x86_64 -- even with rbp locked down, you still have fourteen registers there.

100% the way I see it! On 32-bit the performance benefits is very major on just about everything, but not so on 64-bit.

Re: Ubuntu 24.04 LTS will enable frame pointers by default

#8

hasn't this already been in fedora for almost a year?

You're not wrong, but isn't it exciting that it's gaining more traction? Ubuntu is also very widely deployed, so I'll celebrate every distro that makes this the default, be it Ubuntu in this case, or Debian, or Arch, or Suse, or or or...

Re: Ubuntu 24.04 LTS will enable frame pointers by default

#10

hasn't this already been in fedora for almost a year?

I believe so, I remember a fair amount of hubbub over it.

Can't say it's been useful here, any development I do is miles away from this. It hasn't hurt either so... cool, I guess

Call me pessimistic, but I'm not convinced this being the default will lead to more profiling. There's plenty that could be done without this, that isn't, so I'm not buying it.

Post reply on HN