| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
Reapply "[lldb/aarch64] Fix unwinding when signal interrupts a leaf f… (#92503) …unction (#91321)" This reapplies fd1bd53ba5a06f344698a55578f6a5d79c457e30, which was reverted due to a test failure on aarch64/windows. The failure was caused by a combination of several factors: - clang targeting aarch64-windows (unlike msvc, and unlike clang targeting other aarch64 platforms) defaults to -fomit-frame-pointers - lldb's code for looking up register values for <same> unwind rules is recursive - the test binary creates a very long chain of fp-less function frames (it manages to fit about 22k frames before it blows its stack) Together, these things have caused lldb to recreate the same deep recursion when unwinding through this, and blow its own stack as well. Since lldb frames are larger, about 4k frames like this was sufficient to trigger the stack overflow. This version of the patch works around this problem by increasing the frame size of the test binary, thereby causing it to blow its stack sooner. This doesn't fix the issue -- the same problem can occur with a real binary -- but it's not very likely, as it requires an infinite recursion in a simple (so it doesn't use the frame pointer) function with a very small frame (so you can fit a lot of them on the stack). A more principled fix would be to make lldb's lookup code non-recursive, but I believe that's out of scope for this patch. The original patch description follows: A leaf function may not store the link register to stack, but we it can still end up being a non-zero frame if it gets interrupted by a signal. Currently, we were unable to unwind past this function because we could not read the link register value. To make this work, this patch: - changes the function-entry unwind plan to include the fp|lr = <same> rules. This in turn necessitated an adjustment in the generic instruction emulation logic to ensure that lr=[sp-X] can override the <same> rule. - allows the <same> rule for pc and lr in all m_all_registers_available frames (and not just frame zero). The test verifies that we can unwind in a situation like this, and that the backtrace matches the one we computed before getting a signal. | 2 年前 | |
Fix lldb test failure due to D93082. Rename the basic block symbols in the test to reflect the new names. | 5 年前 | |
[lldb/Test] Disable eh-frame-augment-noop.test on macOS The test fails on Darwin because a different Asynchronous UnwindPlan is chosen: Asynchronous (not restricted to call-sites) UnwindPlan is 'assembly insn profiling'` instead of what the test expects: Asynchronous (not restricted to call-sites) UnwindPlan is 'eh_frame CFI' | 6 年前 | |
[lldb] Update eh-frame-dwarf-unwind-abort.test for a change in llvm assembler The jump instruction now gets encoded as a near jump, which changes some offsets. | 2 年前 | |
[lldb] Disable shell tests affected by ld_new bug (#84246) Equivalent to the changes made in https://github.com/llvm/llvm-project/pull/83941, except to support shell tests. | 2 年前 | |
[lldb/lit] Introduce %clang_host substitutions Summary: This patch addresses an ambiguity in how our existing tests invoke the compiler. Roughly two thirds of our current "shell" tests invoke the compiler to build the executables for the host. However, there is also a significant number of tests which don't build a host binary (because they don't need to run it) and instead they hardcode a certain target. We also have code which adds a bunch of default arguments to the %clang substitutions. However, most of these arguments only really make sense for the host compilation. So far, this has worked mostly ok, because the arguments we were adding were not conflicting with the target-hardcoding tests (though they did provoke an occasional "argument unused" warning). However, this started to break down when we wanted to use target-hardcoding clang-cl tests (D69031) because clang-cl has a substantially different command line, and it was getting very confused by some of the arguments we were adding on non-windows hosts. This patch avoid this problem by creating separate %clang(xx,_cl)_host substutitions, which are specifically meant to be used for compiling host binaries. All funny host-specific options are moved there. To ensure that the regular %clang substitutions are not used for compiling host binaries (skipping the extra arguments) I employ a little hac^H^H^Htrick -- I add an invalid --target argument to the %clang substitution, which means that one has to use an explicit --target in order for the compilation to succeed. Reviewers: JDevlieghere, aprantl, mstorsjo, espindola Subscribers: emaste, arichardson, MaskRay, jfb, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D69619 | 6 年前 | |
[lldb][test] Re-XFAIL prefer-debug-over-eh-frame.test This was un-XFAILed in 83cb2123be487302070562c45e6eb4955b22c2b4 due to D144999. Since then D152540 fixed emission of eh_frame's on Darwin, causing this test to fail again. Differential Revision: https://reviews.llvm.org/D152806 | 3 年前 | |
Reapply "[lldb/aarch64] Fix unwinding when signal interrupts a leaf f… (#92503) …unction (#91321)" This reapplies fd1bd53ba5a06f344698a55578f6a5d79c457e30, which was reverted due to a test failure on aarch64/windows. The failure was caused by a combination of several factors: - clang targeting aarch64-windows (unlike msvc, and unlike clang targeting other aarch64 platforms) defaults to -fomit-frame-pointers - lldb's code for looking up register values for <same> unwind rules is recursive - the test binary creates a very long chain of fp-less function frames (it manages to fit about 22k frames before it blows its stack) Together, these things have caused lldb to recreate the same deep recursion when unwinding through this, and blow its own stack as well. Since lldb frames are larger, about 4k frames like this was sufficient to trigger the stack overflow. This version of the patch works around this problem by increasing the frame size of the test binary, thereby causing it to blow its stack sooner. This doesn't fix the issue -- the same problem can occur with a real binary -- but it's not very likely, as it requires an infinite recursion in a simple (so it doesn't use the frame pointer) function with a very small frame (so you can fit a lot of them on the stack). A more principled fix would be to make lldb's lookup code non-recursive, but I believe that's out of scope for this patch. The original patch description follows: A leaf function may not store the link register to stack, but we it can still end up being a non-zero frame if it gets interrupted by a signal. Currently, we were unable to unwind past this function because we could not read the link register value. To make this work, this patch: - changes the function-entry unwind plan to include the fp|lr = <same> rules. This in turn necessitated an adjustment in the generic instruction emulation logic to ensure that lr=[sp-X] can override the <same> rule. - allows the <same> rule for pc and lr in all m_all_registers_available frames (and not just frame zero). The test verifies that we can unwind in a situation like this, and that the backtrace matches the one we computed before getting a signal. | 2 年前 | |
Test to check backtraces with machine function splitting. clang supports option -fsplit-machine-functions and this test checks if the backtraces are sane when functions are split. With -fsplit-machine-functions, a function with profiles can get split into 2 parts, the original function containing hot code and a cold part as determined by the profile info and the cold cutoff threshold.. The cold part gets the ".cold" suffix to disambiguate its symbol from the hot part and can be placed arbitrarily in the address space. This test checks if the back-trace looks correct when the cold part is executed. Differential Revision: https://reviews.llvm.org/D90081 | 5 年前 | |
[lldb] Disable shell tests affected by ld_new bug (#84246) Equivalent to the changes made in https://github.com/llvm/llvm-project/pull/83941, except to support shell tests. | 2 年前 | |
[lldb/lit] Introduce %clang_host substitutions Summary: This patch addresses an ambiguity in how our existing tests invoke the compiler. Roughly two thirds of our current "shell" tests invoke the compiler to build the executables for the host. However, there is also a significant number of tests which don't build a host binary (because they don't need to run it) and instead they hardcode a certain target. We also have code which adds a bunch of default arguments to the %clang substitutions. However, most of these arguments only really make sense for the host compilation. So far, this has worked mostly ok, because the arguments we were adding were not conflicting with the target-hardcoding tests (though they did provoke an occasional "argument unused" warning). However, this started to break down when we wanted to use target-hardcoding clang-cl tests (D69031) because clang-cl has a substantially different command line, and it was getting very confused by some of the arguments we were adding on non-windows hosts. This patch avoid this problem by creating separate %clang(xx,_cl)_host substutitions, which are specifically meant to be used for compiling host binaries. All funny host-specific options are moved there. To ensure that the regular %clang substitutions are not used for compiling host binaries (skipping the extra arguments) I employ a little hac^H^H^Htrick -- I add an invalid --target argument to the %clang substitution, which means that one has to use an explicit --target in order for the compilation to succeed. Reviewers: JDevlieghere, aprantl, mstorsjo, espindola Subscribers: emaste, arichardson, MaskRay, jfb, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D69619 | 6 年前 | |
[lldb] Disable unaligned-pc-sigbus.test on arm(32) I though the test could work there as well, but (of course) it does not, because the lowest bit just means "run the code as thumb". | 2 年前 | |
[lldb] Remove custom DWARF expression printing code The llvm DWARFExpression dump is nearly identical, but better -- for example it does print a spurious space after zero-argument expressions. Some parts of our code (variable locations) have been already switched to llvm-based expression dumping. This switches the remainder: unwind plans and some unit tests. | 6 年前 | |
[lldb] Reduce the stack alignment requirements for the Windows x86_64 ABI This fixes https://github.com/llvm/llvm-project/issues/56095. Differential Revision: https://reviews.llvm.org/D129455 | 4 年前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 2 年前 | ||
| 5 年前 | ||
| 6 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 6 年前 | ||
| 3 年前 | ||
| 2 年前 | ||
| 5 年前 | ||
| 2 年前 | ||
| 6 年前 | ||
| 2 年前 | ||
| 6 年前 | ||
| 4 年前 |