-
Notifications
You must be signed in to change notification settings - Fork 10.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Backtracing] Implement API per SE-0419 #78516
Open
al45tair
wants to merge
9
commits into
swiftlang:main
Choose a base branch
from
al45tair:eng/PR-124913332
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
+6,492
−2,505
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
al45tair
requested review from
jckarter,
rjmccall,
ahoppen,
bnbarham,
hamishknight,
rintaro,
mikeash,
a team,
artemcm,
tshortli,
MaxDesiatov,
etcwilde,
hborla,
slavapestov,
xedin and
DougGregor
as code owners
January 9, 2025 12:16
@swift-ci Please test |
The first changeset, "Update module maps", is the subject of a separate PR. |
Hmmm. Looks like maybe my change to add |
al45tair
force-pushed
the
eng/PR-124913332
branch
from
January 9, 2025 16:25
83f84b1
to
468f648
Compare
Now that Darwin is provided by the system, we no longer need to disable the system module maps in favour of our own, which also resolves a few other problems that doing that was creating. rdar://137201928
We're going to rename the module to Runtime, and it isn't going to be an implicit import, so we don't need any of this. rdar://124913332
Move the backtracing code into a new Runtime module. This means renaming the Swift Runtime's CMake target because otherwise there will be a name clash. rdar://124913332
We want to be able to efficiently serialise lists of images, and to do so it makes most sense to create a separate `ImageMap` type. This also provides a useful place to put methods to e.g. find an image by address or by build ID. rdar://124913332
…String`s. We already try using `CFStringGetCStringPtr` to see if we can get ASCII; we should also try `CFStringGetCharactersPtr` as the native encoding of `CFNSString` is very often UTF-16. While we're at it, try asking explicitly for UTF-8 as well. That won't work for `CFNSString` because AFAIK it's currently never encoded that way, but it might work if something hands us a Swift-backed string or if some future implementation of `CFString` happens to support UTF-8 encoded data. rdar://124913332
The Runtime module is using C++ interop, which doesn't seem to play nicely with MemberImportVisibility. rdar://124913332
This lets us repeat a frame over and over; it only works for a single frame, but that's the common case for infinite recursions. rdar://124913332
Add support for Codable to Bactkrace. rdar://124913332
Because it's a target executable, the name of the dependency is suffixed with the SDK. rdar://124913332
al45tair
force-pushed
the
eng/PR-124913332
branch
from
January 9, 2025 16:27
468f648
to
01e2468
Compare
@swift-ci Please test |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Implement the API described in SE-0419, in a new module
Runtime
that you can import from your Swift program.Additionally, made symbolicated backtraces approximately 5x faster on Linux.
rdar://124913332