Opened 6 years ago

Closed 6 years ago

#11047 closed defect (fixed)

Use -fno-omit-frame-pointer or -fasynchronous-unwind-tables options to make backtraces work better

Reported by: nickm Owned by:
Priority: Medium Milestone: Tor: 0.2.5.x-final
Component: Core Tor/Tor Version:
Severity: Keywords: tor-relay backtrace
Cc: Actual Points:
Parent ID: #11046 Points:
Reviewer: Sponsor:


With GCC, the implicit or explicit use of the "omit-frame-pointer" optimization can interfere with generating backtraces on some architectures. According to cypherpunks on #9299:

Stack trace unreadable if FPO enabled in general or used optimization options (then FPO applied selectively by compiler depends function's code) for x86 platform. It's not problem for x86_64 because GCC generates unwind tables there by default.
If to enable unwind tables by "-fasynchronous-unwind-tables" then stack trace readable with any optimizations.

cypherpunks also notes that starting with GCC 4.6, -fomit-frame-pointer is on by default on several optimization levels.

Child Tickets

Attachments (1)

0001-pass-our-compiler-fasynchronous-unwind-tables-by-def.patch (1.9 KB) - added by nickm 6 years ago.

Download all attachments as: .zip

Change History (5)

comment:1 Changed 6 years ago by nickm

Will this work? (See attachment, or branch 'bug11047' in my public repository.)

comment:2 Changed 6 years ago by nickm

Status: newneeds_review

comment:3 Changed 6 years ago by cypherpunks

Will this work?


comment:4 Changed 6 years ago by nickm

Resolution: fixed
Status: needs_reviewclosed

Okay, merged it. Let's see if it breaks on any weird platforms or compilers.

Note: See TracTickets for help on using tickets.