Skip to content

[Backtracing][Linux] Add Linux crash handler to the runtime. - #66334

Merged
al45tair merged 5 commits into
swiftlang:mainfrom
al45tair:eng/PR-110261430
Jun 7, 2023
Merged

al45tair merged 5 commits into
swiftlang:mainfrom
al45tair:eng/PR-110261430

Conversation

@al45tair

@al45tair al45tair commented Jun 5, 2023

Copy link
Copy Markdown
Contributor

This also adds a function to demangle a symbol, and a way for the backtracing code to report warning messages to the same place as the main runtime.

I'd like to rename the _swift_isThunkFunction() SPI also, but we can't do that until we've made the changes to the _Backtracing library, so we'll do that there instead.

rdar://110261430

This also adds a function to demangle a symbol, and a way for the
backtracing code to report warning messages to the same place as
the main runtime.

I'd like to rename the _swift_isThunkFunction() SPI also, but we
can't do that until we've made the changes to the _Backtracing
library, so we'll do that there instead.

rdar://110261430
@al45tair

al45tair commented Jun 5, 2023

Copy link
Copy Markdown
Contributor Author

@swift-ci Please smoke test

This was added to a later PR, but not to this one, though we need
it here.

rdar://110261430
@al45tair

al45tair commented Jun 5, 2023

Copy link
Copy Markdown
Contributor Author

@swift-ci Please smoke test

This should have been disabled until swiftlang#66338.

rdar://110261430
@al45tair

al45tair commented Jun 5, 2023

Copy link
Copy Markdown
Contributor Author

@swift-ci Please smoke test

@al45tair
al45tair requested a review from mikeash June 6, 2023 10:06
@al45tair

al45tair commented Jun 6, 2023

Copy link
Copy Markdown
Contributor Author

If you're wondering where the tests are, I left them until the last PR (#66338) so everything was enabled and they'd actually work.

@mikeash mikeash left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few little comments, but LGTM.

Comment thread include/swift/Runtime/CrashInfo.h
Comment thread stdlib/public/runtime/Backtrace.cpp
Comment thread stdlib/public/runtime/Backtrace.cpp
Comment thread stdlib/public/runtime/Backtrace.cpp
Comment thread stdlib/public/runtime/Backtrace.cpp
Comment thread stdlib/public/runtime/CrashHandlerLinux.cpp Outdated
Comment thread stdlib/public/runtime/CrashHandlerLinux.cpp
Comment thread stdlib/public/runtime/CrashHandlerLinux.cpp
Comment thread stdlib/public/runtime/CrashHandlerLinux.cpp
Comment thread stdlib/public/runtime/CrashHandlerLinux.cpp
Comment thread include/swift/Runtime/Backtrace.h
al45tair added 2 commits June 6, 2023 16:06
Mike and Max made various helpful suggestions, so I've added and updated
various comments and amended the code to cope with partial reads and
writes.

rdar://110261430
Moved the comment for `_swift_backtrace_demangle` into the header file
instead of it being in the implementation.

rdar://110261430
@al45tair

al45tair commented Jun 6, 2023

Copy link
Copy Markdown
Contributor Author

@swift-ci Please smoke test

@MaxDesiatov MaxDesiatov left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants