Alastair Houghton
e5680de071
[Backtracing] Security improvements.
...
Use `task_read_for_pid()` rather than having the crashing program pass its
own task port through. This opts us in to additional OS security measures
surrounding the use of this call.
rdar://107362003
2023-04-12 12:48:33 +01:00
Alastair Houghton
9209bdd8c4
[Backtracing] Add an option to output to stderr.
...
In CI, it would be better if the backtraces went to stderr rather than
stdout, so provide an option for that.
rdar://107192120
2023-03-24 17:13:52 +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
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
4edfacb16b
[Backtracing][Runtime] Fix a copy/paste blunder.
...
Accidentally wrote `thread_resume()` instead of `thread_suspend()`.
rdar://105391747
2023-03-04 07:56:03 +00:00
Alastair Houghton
b9e79c431f
[Backtracing][Runtime] Don't replace existing signal handlers.
...
If we find signal handlers already installed, leave them alone.
rdar://105391747
2023-03-04 07:56:03 +00:00
Alastair Houghton
8a29657f4c
[Runtime] [Darwin] Add code to trigger the external backtracer.
...
When a Swift program crashes, we should catch the crash and execute the
external backtracer.
rdar://105391747
2023-03-04 07:56:02 +00:00