|
Revision tags: llvmorg-18.1.8 |
|
| #
fe1301b5 |
| 10-Jun-2024 |
Alastair Houghton <ahoughton@apple.com> |
[libunwind] Tweak tests for musl support. (#85097)
We can't use `dladdr()` in the tests, because when we're statically
linking with musl that function is a no-op.
Additionally, because musl disa
[libunwind] Tweak tests for musl support. (#85097)
We can't use `dladdr()` in the tests, because when we're statically
linking with musl that function is a no-op.
Additionally, because musl disables emission of unwind information in
its build, and because its signal trampolines don't include unwind
information, tests that involve unwinding through a signal handler won't
work and need to be disabled for musl.
rdar://123436891
show more ...
|
|
Revision tags: llvmorg-18.1.7, llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init |
|
| #
ca06c330 |
| 09-Jan-2024 |
Louis Dionne <ldionne.2@gmail.com> |
[libc++] Allow running the test suite with optimizations (#68753)
This patch adds a configuration of the libc++ test suite that enables
optimizations when building the tests. It also adds a new CI
[libc++] Allow running the test suite with optimizations (#68753)
This patch adds a configuration of the libc++ test suite that enables
optimizations when building the tests. It also adds a new CI
configuration to exercise this on a regular basis. This is added in the
context of [1], which requires building with optimizations in order to
hit the bug.
[1]: https://github.com/llvm/llvm-project/issues/68552
show more ...
|
|
Revision tags: llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4, llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init, llvmorg-16.0.6, llvmorg-16.0.5, llvmorg-16.0.4 |
|
| #
f56ea14c |
| 06-May-2023 |
Feng Wang <wangfeng@eswincomputing.com> |
[libunwind] Unwind through Linux riscv sigreturn trampoline
Similar to D90898 (Linux AArch64) and D124765 (SystemZ).
On an Arch Linux RISC-V (riscv64gc), the following code
``` #define _GNU_SOURCE
[libunwind] Unwind through Linux riscv sigreturn trampoline
Similar to D90898 (Linux AArch64) and D124765 (SystemZ).
On an Arch Linux RISC-V (riscv64gc), the following code
``` #define _GNU_SOURCE #include <dlfcn.h> #include <libunwind.h> #include <signal.h> #include <stdio.h> #include <stdlib.h>
static void handler(int signo) { unw_context_t context; unw_cursor_t cursor; unw_getcontext(&context); unw_init_local(&cursor, &context); unw_word_t pc, sp; do { unw_get_reg(&cursor, UNW_REG_IP, &pc); unw_get_reg(&cursor, UNW_REG_SP, &sp); printf("pc=0x%016zx sp=0x%016zx", (size_t)pc, (size_t)sp); Dl_info info = {}; if (dladdr((void *)pc, &info)) printf(" %s:%s", info.dli_fname, info.dli_sname ? info.dli_sname : ""); puts(""); } while (unw_step(&cursor) > 0); exit(0); }
int main() { signal(SIGUSR1, handler); raise(SIGUSR1); return 1; } ```
linked with `-Wl,--export-dynamic` gives an output like ``` pc=0x0000000000010a82 sp=0x00007fffd8a0b910 ./b: pc=0x00007fffa7e77800 sp=0x00007fffd8a0c520 linux-vdso.so.1:__vdso_rt_sigreturn pc=0x00007fffa7d73bee sp=0x00007fffd8a0c960 /usr/lib/libc.so.6: pc=0x00007fffa7d3ed66 sp=0x00007fffd8a0c9b0 /usr/lib/libc.so.6:gsignal pc=0x0000000000010a3c sp=0x00007fffd8a0c9c0 ./b:main pc=0x00007fffa7d2f1d4 sp=0x00007fffd8a0c9e0 /usr/lib/libc.so.6: pc=0x00007fffa7d2f27c sp=0x00007fffd8a0cb10 /usr/lib/libc.so.6:__libc_start_main pc=0x00000000000109a0 sp=0x00007fffd8a0cb60 ./b:_start ```
Co-Authored-By: Fangrui Song <i@maskray.me>
Reviewed By: #libunwind, MaskRay
Differential Revision: https://reviews.llvm.org/D148499
show more ...
|
|
Revision tags: llvmorg-16.0.3 |
|
| #
bda5f77f |
| 23-Apr-2023 |
Fangrui Song <i@maskray.me> |
[test] Simplify libunwind REQUIRES
|
|
Revision tags: llvmorg-16.0.2, llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4, llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7, llvmorg-15.0.6, llvmorg-15.0.5, llvmorg-15.0.4, llvmorg-15.0.3, working, llvmorg-15.0.2, llvmorg-15.0.1, llvmorg-15.0.0, llvmorg-15.0.0-rc3 |
|
| #
dad00daa |
| 21-Aug-2022 |
Gabriel Ravier <gabravier@gmail.com> |
[libunwind] Fixed a number of typos
I went over the output of the following mess of a command:
`(ulimit -m 2000000; ulimit -v 2000000; git ls-files -z | parallel --xargs -0 cat | aspell list --mode
[libunwind] Fixed a number of typos
I went over the output of the following mess of a command:
`(ulimit -m 2000000; ulimit -v 2000000; git ls-files -z | parallel --xargs -0 cat | aspell list --mode=none --ignore-case | grep -E '^[A-Za-z][a-z]*$' | sort | uniq -c | sort -n | grep -vE '.{25}' | aspell pipe -W3 | grep : | cut -d' ' -f2 | less)`
and proceeded to spend a few days looking at it to find probable typos and fixed a few hundred of them in all of the llvm project (note, the ones I found are not anywhere near all of them, but it seems like a good start).
Reviewed By: #libunwind, MaskRay
Differential Revision: https://reviews.llvm.org/D130948
show more ...
|
|
Revision tags: llvmorg-15.0.0-rc2 |
|
| #
fc6a6ee5 |
| 04-Aug-2022 |
Florian Mayer <fmayer@google.com> |
[libunwind] undef NDEBUG for assert.h in tests.
This makes sure the assertions also get verified in optimized builds. This matches what is already done in bad_unwind_info.pass.cpp.
Reviewed By: #li
[libunwind] undef NDEBUG for assert.h in tests.
This makes sure the assertions also get verified in optimized builds. This matches what is already done in bad_unwind_info.pass.cpp.
Reviewed By: #libunwind, MaskRay
Differential Revision: https://reviews.llvm.org/D131210
show more ...
|
|
Revision tags: llvmorg-15.0.0-rc1, llvmorg-16-init, llvmorg-14.0.6, llvmorg-14.0.5, llvmorg-14.0.4 |
|
| #
71672375 |
| 04-May-2022 |
Ulrich Weigand <ulrich.weigand@de.ibm.com> |
[libunwind][SystemZ] Unwind out of signal handlers
Unwinding out of signal handlers currently does not work since the sigreturn trampoline is not annotated with CFI data.
Fix this by detecting the
[libunwind][SystemZ] Unwind out of signal handlers
Unwinding out of signal handlers currently does not work since the sigreturn trampoline is not annotated with CFI data.
Fix this by detecting the sigreturn trampoline during unwinding and providing appropriate unwind data manually. This follows closely the approach used by existing code for the AArch64 target.
Reviewed by: MaskRay
Differential Revision: https://reviews.llvm.org/D124765
show more ...
|
|
Revision tags: llvmorg-14.0.3, llvmorg-14.0.2, llvmorg-14.0.1, llvmorg-14.0.0, llvmorg-14.0.0-rc4, llvmorg-14.0.0-rc3 |
|
| #
cb055e51 |
| 02-Mar-2022 |
Louis Dionne <ldionne.2@gmail.com> |
[libc++] Add a CI job running MSAN
For some reason, we've been going without a MSAN CI job, even though even run-buildbot defined a generic-msan job. This must have been an oversight that went unnot
[libc++] Add a CI job running MSAN
For some reason, we've been going without a MSAN CI job, even though even run-buildbot defined a generic-msan job. This must have been an oversight that went unnoticed. Thanks to @EricWF for the catch.
Differential Revision: https://reviews.llvm.org/D120851
show more ...
|
|
Revision tags: llvmorg-14.0.0-rc2, llvmorg-14.0.0-rc1, llvmorg-15-init, llvmorg-13.0.1, llvmorg-13.0.1-rc3, llvmorg-13.0.1-rc2 |
|
| #
f178a05f |
| 03-Dec-2021 |
Leonard Chan <leonardchan@google.com> |
[libunwind] Fix unwind_leaffunction test
It's possible for this test not to pass if the libc used does not provide unwind info for raise. We can replace it with __builtin_cast, which can lead to a S
[libunwind] Fix unwind_leaffunction test
It's possible for this test not to pass if the libc used does not provide unwind info for raise. We can replace it with __builtin_cast, which can lead to a SIGTRAP on x86_64 and a SIGILL on aarch64.
Using this alternative, a nop is needed before the __builtin_cast. This is because libunwind incorrectly decrements pc, which can cause pc to jump into the previous function and use the incorrect FDE.
Differential Revision: https://reviews.llvm.org/D114818
show more ...
|
|
Revision tags: llvmorg-13.0.1-rc1 |
|
| #
ebfeeec4 |
| 22-Nov-2021 |
Louis Dionne <ldionne.2@gmail.com> |
[libunwind] Fix testing with sanitizers enabled
When testing with sanitizers enabled, we need to link against a plethora of system libraries. Using `-nodefaultlibs` like we used to breaks this, and
[libunwind] Fix testing with sanitizers enabled
When testing with sanitizers enabled, we need to link against a plethora of system libraries. Using `-nodefaultlibs` like we used to breaks this, and we would have to add all these system libraries manually, which is not portable and error prone. Instead, stop using `-nodefaultlibs` so that we get the libraries added by default by the compiler.
The only caveat with this approach is that we are now relying on the fact that `-L <path-to-local-libunwind>` will cause the just built libunwind to be selected before the system implementation (either of libunwind or libgcc_s.so), which is somewhat fragile.
This patch also turns the 32 bit multilib build into a soft failure since we are in the process of removing it anyway, see D114473 for details. This patch is incompatible with the 32 bit multilib build because Ubuntu does not provide a proper libstdc++ for 32 bits, and that is required when running with sanitizers enabled.
Differential Revision: https://reviews.llvm.org/D114385
show more ...
|
| #
6fd55bba |
| 12-Oct-2021 |
Louis Dionne <ldionne.2@gmail.com> |
[libunwind] Add a from-scratch config for running libunwind tests
Running tests for libunwind is a lot simpler than running tests for libc++, so a simple Lit config file is sufficient. The benefit i
[libunwind] Add a from-scratch config for running libunwind tests
Running tests for libunwind is a lot simpler than running tests for libc++, so a simple Lit config file is sufficient. The benefit is that we disentangle the libunwind test configuration from the libc++ and libc++abi test configuration. The setup was too complicated, which led to some bugs (notably we were running against the system libunwind on Apple platforms).
Differential Revision: https://reviews.llvm.org/D111664
show more ...
|
| #
60fe1f59 |
| 30-Sep-2021 |
Louis Dionne <ldionne.2@gmail.com> |
[runtimes][ci] Run the tests for libunwind in the CI
We should arguably have always been doing that. The state of libunwind is quite sad, so this commit adds several XFAILs to make the CI pass. We n
[runtimes][ci] Run the tests for libunwind in the CI
We should arguably have always been doing that. The state of libunwind is quite sad, so this commit adds several XFAILs to make the CI pass. We need to investigate why so many tests are not passing in some configurations, but I'll defer that to folks who actually work on libunwind for lack of bandwidth.
Differential Revision: https://reviews.llvm.org/D110872
show more ...
|
|
Revision tags: llvmorg-13.0.0, llvmorg-13.0.0-rc4, llvmorg-13.0.0-rc3, llvmorg-13.0.0-rc2, llvmorg-13.0.0-rc1, llvmorg-14-init, llvmorg-12.0.1, llvmorg-12.0.1-rc4, llvmorg-12.0.1-rc3 |
|
| #
c360553c |
| 18-Jun-2021 |
Louis Dionne <ldionne.2@gmail.com> |
[runtimes] Simplify how we specify XFAIL & friends based on the triple
Now that Lit supports regular expressions inside XFAIL & friends, it is much easier to write Lit annotations based on the tripl
[runtimes] Simplify how we specify XFAIL & friends based on the triple
Now that Lit supports regular expressions inside XFAIL & friends, it is much easier to write Lit annotations based on the triple.
Differential Revision: https://reviews.llvm.org/D104747
show more ...
|
|
Revision tags: llvmorg-12.0.1-rc2, llvmorg-12.0.1-rc1, llvmorg-12.0.0, llvmorg-12.0.0-rc5, llvmorg-12.0.0-rc4, llvmorg-12.0.0-rc3, llvmorg-12.0.0-rc2, llvmorg-11.1.0, llvmorg-11.1.0-rc3, llvmorg-12.0.0-rc1, llvmorg-13-init, llvmorg-11.1.0-rc2 |
|
| #
c82deed6 |
| 14-Jan-2021 |
Ryan Prichard <rprichard@google.com> |
[libunwind] Unwind through aarch64/Linux sigreturn frame
An AArch64 sigreturn trampoline frame can't currently be described in a DWARF .eh_frame section, because the AArch64 DWARF spec currently doe
[libunwind] Unwind through aarch64/Linux sigreturn frame
An AArch64 sigreturn trampoline frame can't currently be described in a DWARF .eh_frame section, because the AArch64 DWARF spec currently doesn't define a constant for the PC register. (PC and LR may need to be restored to different values.)
Instead, use the same technique as libgcc or github.com/libunwind and detect the sigreturn frame by looking for the sigreturn instructions:
mov x8, #0x8b svc #0x0
If a sigreturn frame is detected, libunwind restores all the GPRs by assuming that sp points at an rt_sigframe Linux kernel struct. This behavior is a fallback mode that is only used if there is no ordinary unwind info for sigreturn.
If libunwind can't find unwind info for a PC, it assumes that the PC is readable, and would crash if it isn't. This could happen if: - The PC points at a function compiled without unwind info, and which is part of an execute-only mapping (e.g. using -Wl,--execute-only). - The PC is invalid and happens to point to unreadable or unmapped memory.
In the tests, ignore a failed dladdr call so that the tests can run on user-mode qemu for AArch64, which uses a stack-allocated trampoline instead of a vDSO.
Reviewed By: danielkiss, compnerd, #libunwind
Differential Revision: https://reviews.llvm.org/D90898
show more ...
|
|
Revision tags: llvmorg-11.1.0-rc1, llvmorg-11.0.1, llvmorg-11.0.1-rc2, llvmorg-11.0.1-rc1 |
|
| #
504bc07d |
| 08-Oct-2020 |
Louis Dionne <ldionne@apple.com> |
[runtimes] Use int main(int, char**) consistently in tests
This is needed when running the tests in Freestanding mode, where main() isn't treated specially. In Freestanding, main() doesn't get mangl
[runtimes] Use int main(int, char**) consistently in tests
This is needed when running the tests in Freestanding mode, where main() isn't treated specially. In Freestanding, main() doesn't get mangled as extern "C", so whatever runtime we're using fails to find the entry point.
One way to solve this problem is to define a symbol alias from __Z4mainiPPc to _main, however this requires all definitions of main() to have the same mangling. Hence this commit.
show more ...
|
|
Revision tags: llvmorg-11.0.0, llvmorg-11.0.0-rc6, llvmorg-11.0.0-rc5, llvmorg-11.0.0-rc4, llvmorg-11.0.0-rc3 |
|
| #
22b615a9 |
| 16-Sep-2020 |
Daniel Kiss <daniel.kiss@arm.com> |
[libunwind] Support for leaf function unwinding.
Unwinding leaf function is useful in cases when the backtrace finds a leaf function for example when it caused a signal. This patch also add the supp
[libunwind] Support for leaf function unwinding.
Unwinding leaf function is useful in cases when the backtrace finds a leaf function for example when it caused a signal. This patch also add the support for the DW_CFA_undefined because it marks the end of the frames.
Ryan Prichard provided code for the tests.
Reviewed By: #libunwind, mstorsjo
Differential Revision: https://reviews.llvm.org/D83573
Reland with limit the test to the x86_64-linux target.
show more ...
|
| #
23bef7ee |
| 16-Sep-2020 |
Daniel Kiss <daniel.kiss@arm.com> |
[libunwind] Support for leaf function unwinding.
Unwinding leaf function is useful in cases when the backtrace finds a leaf function for example when it caused a signal. This patch also add the supp
[libunwind] Support for leaf function unwinding.
Unwinding leaf function is useful in cases when the backtrace finds a leaf function for example when it caused a signal. This patch also add the support for the DW_CFA_undefined because it marks the end of the frames.
Ryan Prichard provided code for the tests.
Reviewed By: #libunwind, mstorsjo
Differential Revision: https://reviews.llvm.org/D83573
show more ...
|