During a backtrace the .cfi_undefined for a float register causes an assert in libunwind.
Details
- Reviewers
MaskRay - Group Reviewers
Restricted Project - Commits
- rG77aa9ca92ae4: [libunwind] Support cfi_undefined and cfi_register for float registers.
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
The test fails with g++ on an aarch64-linux-gnu machine.
libunwind/test/floatregister.pass.cpp | ||
---|---|---|
11 | Does target={{aarch64-.+}} work? There is no RUN line. |
this works for me:
>uname -m -o aarch64 GNU/Linux >g++ --vesion g++ (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0 >g++ libunwind/test/floatregister.pass.cpp -Wl,--export-dynamic -Wl,-ldl
libunwind/test/floatregister.pass.cpp | ||
---|---|---|
11 |
It could. Maybe Windows won't work due to dladdr IIRC.
As none of the test here needs one. |
This tests needs -Wl,--export-dynamic to work. I missed the fact.
--export-dynamic is specified by if triple is not None and 'linux' in triple: self.cxx.link_flags += ['-Wl,--export-dynamic'] in test/libunwind/test/config.py.
Ideally the test itself should specify such a flag, but the change LGTM.
libunwind/test/floatregister.pass.cpp | ||
---|---|---|
41 | The comment can be improved by saying what the 4 directives do. |
libunwind/test/floatregister.pass.cpp | ||
---|---|---|
40 |
This broke building for armv7-mingw. The Register_arm version of getFloatRegister() is not const, contrary to the other getFloatRegister() implementations for other architectures. It's not a plain oversight, as Registers_arm::getFloatRegister has a bunch of logic for fetching the relevant register banks (VFP 0-15, VFP 16-31 or WMMX) if not yet fetched, so it can't be made const easily. And I don't think it's a place where it's necessarily right to make the member variables mutable either...
The one tweak that does seem to work though, is to make DwarfInstructions<A, R>::getSavedFloatRegister take a non-const R argument.
Ping @danielkiss This broke building for dwarf configurations on arm, see comments above.
@mstorsjo sorry for that, other tweak would be just the exclude the RegisterInRegister case for arm. I feel better with this than chaining the interface.
#ifndef _LIBUNWIND_TARGET_ARM return registers.getFloatRegister((int)savedReg.value); #endif
Does target={{aarch64-.+}} work?
There is no RUN line.