Tweaked the comment in `Runtime/Config.h`.
Fixed a couple of incorrect ARM64 instruction mnemonics. This still needs
testing on ARM64 Windows.
Fixed an out-of-date comment in `swift-backtrace`.
Use a macro in `Backtrace.cpp` to guarantee we don't overrun the buffer,
and in the process simplify the code slightly.
rdar://101623384
We can't use `|| true` on Windows, so use `not` instead.
Also, on Windows, program names get downcased because `lit` uses
`os.path.normcase()`, so if we have program names in the output,
make sure the programs are already lower-case.
Fix up the stack overflow test to match the expected output.
Plus fix the macOS build to always build for macOS 26.0 or above.
rdar://101623384
We should only add the assembly files if we're actually going
to build the `Runtime` module. This was tripping up iOS/tvOS/
watchOS builds.
rdar://101623384
Also, fix two files that managed to use Windows API without
importing `WinSDK` as a result of the leakage caused by including
`windows.h` from `codeview.h`.
rdar://101623384
`swift_slowAlloc()` and related functions assume that `malloc(0)` and `aligned_alloc(0)` return non-`NULL` pointers. The C standards allow implementations to return `NULL` when the allocation size is `0`.
This PR implements a check for `0` that instead allocates `1`. The cost of the check is negligible next to the cost of actually allocating, but we'll mark it `SWIFT_UNLIKELY` just in case.
Resolves rdar://169304909.
We have a private oslog library to test optimizations specific for oslog.
Add -assert-config DisableReplacement to this library similar to the real oslog library.
This prevents surprizing optimizer regressions.
Hitting `D` when in the backtracer should do the same on Windows
that it does on macOS, namely launching `lldb` and attaching it to
the crashed program.
rdar://101623384
On-crash backtracing is basically there for 64-bit Windows. It
won't work on 32-bit because of a Swift compiler issue, and there
is a little more work to do yet, but it is now working!
rdar://101623384
Also fix things so that we use the right path separator, depending
on image type, and add support for `DW_AT_specification` attributes
on `DW_TAG_subprogram` entries.
rdar://101623384
This doesn't have a working symbolicator yet, but it does build and
it can obtain a basic backtrace.
It also doesn't include a working `swift-backtrace` program yet.
rdar://101623384
The module interface for this module intentionally does not qualify its names, since the C++ standard library is modularized differently on different platforms. Make sure we don’t add module selectors to it.
This change is a no-op except in configurations where module selectors are on by default. We are currently testing such configurations before making them the default.
DWARF 3 doesn't have the `maximum_operations_per_instruction` field
in the line number header. As a result, we were mis-reading the
subsequent fields in the DWARF line table header.
rdar://168996222
swift_task_switchImpl can give up its thread and immediately start running the new code. In the actors-as-locks model, this acquires the new actor's lock and releases the old one. This results is a classic lock ordering problem and can deadlock. Avoid this by releasing the old lock first when in this mode.
rdar://168073822