Commit Graph

13 Commits

Author SHA1 Message Date
Allan Shortlidge
79c1e94b4a Revert "Disable several Backtracing tests on Linux AArch64."
This reverts commit 0ceff1ba2d.
2023-06-13 22:53:20 -07:00
Allan Shortlidge
0ceff1ba2d Disable several Backtracing tests on Linux AArch64. 2023-06-13 18:41:15 -07:00
Alastair Houghton
fe0c14fe42 [Backtracing] Make StackOverflow test less sensitive.
Depending on the platform, architecture and stack layout, we may or
may not have line numbers for the very first frame.

rdar://110418951
2023-06-07 21:52:07 +01:00
Alastair Houghton
210ca2a067 [Backtracing][Tests] Fix tests to redirect output from stderr.
Some of the backtracing tests expected output on stdout.

rdar://110371557
2023-06-07 13:55:15 +01:00
Alastair Houghton
ee5596428f [Backtracing][Linux] Enable Linux backtracing, add tests.
Turn on the Linux backtracing implementation and update the tests.

rdar://101623265
2023-06-07 09:08:18 +01:00
Adrian Prantl
158772c2ab Rebase SILScope generation on top of ASTScope.
This patch replaces the stateful generation of SILScope information in
SILGenFunction with data derived from the ASTScope hierarchy, which should be
100% in sync with the scopes needed for local variables. The goal is to
eliminate the surprising effects that the stack of cleanup operations can have
on the current state of SILBuilder leading to a fully deterministic (in the
sense of: predictible by a human) association of SILDebugScopes with
SILInstructions. The patch also eliminates the need to many workarounds. There
are still some accomodations for several Sema transformation passes such as
ResultBuilders, which don't correctly update the source locations when moving
around nodes. If these were implemented as macros, this problem would disappear.

This necessary rewrite of the macro scope handling included in this patch also
adds proper support nested macro expansions.

This fixes

rdar://88274783

and either fixes or at least partially addresses the following:

rdar://89252827
rdar://105186946
rdar://105757810
rdar://105997826
rdar://105102288
2023-04-04 15:20:11 -07:00
Alastair Houghton
3e78f840f6 [Backtracing][Tests] Disable crashing tests under ASAN.
If ASAN is enabled, it will catch the crashes and the backtracing code
won't, so in that case the tests will fail.  Fix by disabling them for
ASAN.

rdar://107129465
2023-03-23 12:09:21 +00:00
Alastair Houghton
2043498a39 [Backtracing] Don't run tests when testing OS stdlib.
We need a symbol from the standard library that isn't in the older
versions of the stdlib.

rdar://106293913
2023-03-07 14:42:28 +00:00
Alastair Houghton
106dd1956e [Backtracing] Fix test failures.
I'd inserted an extra line, which upset the line numbers in the backtracing
tests.

Also tweak the Python build script tests slightly so they work.

rdar://106234311
2023-03-06 11:28:16 +00:00
Alastair Houghton
1258d45152 [Backtracing] Build work.
Additional shimming required for some builds, as well as a few other build
related tweaks.

rdar://106234311
2023-03-04 15:46:30 +00:00
Alastair Houghton
eac93f9d2a [Backtracing][Tests] Apparently we don't see the dyld frame in CI.
For some reason we don't see the dyld frames in CI.  That's fine, don't
check for them.

Also turn NotImportedByDefault off for Windows as it needs a better
shell than the support provided there.
2023-03-04 08:00:09 +00:00
Alastair Houghton
43ac069ad0 [Backtracing] Add control over symbol caching.
Some symbolication frameworks have a symbol cache; we probably don't want
to use that for test cases, to avoid running into problems where the cache
holds stale information.

rdar://105409147
2023-03-04 08:00:09 +00:00
Alastair Houghton
65a6aae04e [Backtracing] Add swift-backtrace to the build.
This is Swift's external backtracer.  It's written in Swift, and it's
responsible for generating nice backtraces when Swift programs crash.
It makes use of the new `_Backtracing` library, which is also (mostly,
aside from some assembly language) implemented in Swift.

rdar://103442000
2023-03-04 08:00:09 +00:00