yingcong-wu wrote:

Added a e2e regression test. I have to manually mark the .eh_frame_hdr as 
omitted in order to make libunwind to do the linear seach which will invoke the 
affected logic.

Local test result:
```
zsh$> clang 1.c -lunwind
zsh$> ldd a.out
        linux-vdso.so.1 (0x00007ffc3b16b000)
        libunwind.so.1 => 
/tmp/llvm-unwind-fde-bug/build-debug/install/lib/x86_64-unknown-linux-gnu/libunwind.so.1
 (0x00007fbac1735000)
        libc.so.6 => /lib64/libc.so.6 (0x00007fbac1511000)
        /lib64/ld-linux-x86-64.so.2 (0x00007fbac174e000)

# skipping the command to update the eh_frame_hdr section

zsh$> ./a.out
123
fde_pc = 0x55fc2620b0d8
fde_fpc = (nil)
fde_fpc1 = 0x55fc2620b0b8
```

And here is the result using libgcc_s's unwind implementation
```
zsh$> clang 1.c
zsh$> ldd a.out
        linux-vdso.so.1 (0x00007fff217c8000)
        libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f410a4aa000)
        libc.so.6 => /lib64/libc.so.6 (0x00007f410a2a0000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f410a4e6000)

# skipping the command to update the eh_frame_hdr section

zsh$> ./a.out
123
fde_pc = 0x5632f0ed50d8
fde_fpc = 0x5632f0ed50b8
fde_fpc1 = 0x5632f0ed50b8
```

https://github.com/llvm/llvm-project/pull/154902
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to