Closed
Bug 1453220
Opened 7 years ago
Closed 5 years ago
Rustc doesn't generate EHABI infomation on Android/arm
Categories
(Firefox Build System :: General, defect)
Tracking
(Not tracked)
RESOLVED
WORKSFORME
People
(Reporter: m_kato, Unassigned)
References
Details
Since crash reporter and gecko profiler cannot walk stack well, I am investigating why both cannot walk stack.
When dumping EHABI unwind information for generated code, object code by rustc doesn't generate EHABI information even if with --enable-debug.
arm-linux-androideabi-readelf -u toolkit/library/armv7-linux-androideabi/debug/incremental/nsstring-144mjr7phvqur/s-f00c36s0ex-doh3gy-1nfagmul8x179/2kjrmm4fe2aha78f.o
Unwind section '.ARM.exidx.text._ZN38_$LT$core..option..Option$LT$T$GT$$GT$3map1
7h593b3637e6548adcE' at offset 0x6c contains 1 entry:
0x0: 0x1 [cantunwind]
Unwind section '.ARM.exidx.text._ZN38_$LT$core..option..Option$LT$T$GT$$GT$3map1
7h7dfe6c3ba31b5218E' at offset 0xac contains 1 entry:
0x0: 0x1 [cantunwind]
...
Of course, "rustc --target armv7-linux-androideabi -O --emit obj main.rs" can generate EHABI information well.
Comment 1•7 years ago
|
||
Here is the problem:
$ rustc --target armv7-linux-androideabi -O --emit obj test.rs -C panic=abort
$ readelf -u test.rs
Unwind section '.ARM.exidx.text._ZN3std2rt10lang_start17h3bf68317e5768cf5E' at offset 0x50 contains 1 entry:
0x0: 0x1 [cantunwind]
(snip)
IOW, -C panic=abort makes the compiler stop emitting those, because it doesn't need them for panic.
Comment 2•7 years ago
|
||
IOW, this is a rustc issue. Please file upstream.
Reporter | ||
Comment 3•7 years ago
|
||
(In reply to Mike Hommey [:glandium] from comment #2)
> IOW, this is a rustc issue. Please file upstream.
Oh, thanks, I filed it as https://github.com/rust-lang/rust/issues/49867
Comment 4•7 years ago
|
||
It looks like the corresponding rustc issue has been resolved. Where are we up to with this now? Just waiting for the fix to reach rust stable so we can use it?
Flags: needinfo?(m_kato)
Reporter | ||
Comment 5•6 years ago
|
||
When I test on Rust 1.27, I cannot sometimes get current stack on rust code. (C++ seems to be OK). I need to investigate this again....
Flags: needinfo?(m_kato)
Comment 6•5 years ago
|
||
Profiler stack walking in rust code on Android seems to be working fine these days. 32 bit example: https://perfht.ml/396JhCL
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•