Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix unwinding when throw is directly before catch#4191

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
WojciechMazur wants to merge9 commits intoscala-native:main
base:main
Choose a base branch
Loading
fromWojciechMazur:eh/fix-lto

Conversation

@WojciechMazur
Copy link
Contributor

@WojciechMazurWojciechMazur commentedJan 31, 2025
edited
Loading

During LTO we were able to get into scenarios where we're throwing exception for which the catch handler is defined as a next instruction. Such cases were not handled before, but are handled by C++ exceptions handling.

The most impacting change include additional condition forpcOffset == landingPad meaning that if we're inside handler we should use it.
This fixes problems where try-finally block executingobject.exitMonitor routine was skipped leading to deadlocks

Initially this PR was fixing fixing#4190 on my MacOS AArch64 machine, however it did not worked on Linux. After further inspection the change to check if we're at the start of next landing pad was leading in infinite loop in this test case#4190 (comment) becouse of that is should be right now treated as a refactor rather then a fix

…truction is directlly followed by catch. These can happen when LTO is enabled. Previously a finally block could have been not executed
…re uniqnes by unwinding point instead full identity
@volatileprivatevarenterQueue:WaiterNode= _

overridedeftoString():String=
s"ObjectMonitor(owner=$ownerThread),waiting=$waiting,recursion=$recursion)"
Copy link
Contributor

Choose a reason for hiding this comment

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

Default toString don't return the parameter names but usually justClassName(param1,param2,param3)

@lolgab
Copy link
Contributor

I see you changed the code reading LSDA to read some DWARF data. Is DWARF always available? How does it work?

@WojciechMazur
Copy link
ContributorAuthor

I see you changed the code reading LSDA to read some DWARF data. Is DWARF always available? How does it work?

Not really, so far I have not observed them locally, but I've added the checks based on LLVM cxx_personality logic
https://github.com/llvm/llvm-project/blob/77d3f8a92564b533a3c60a8c8e0657c38fd88ba1/libcxxabi/src/cxa_personality.cpp#L663-L665

In theory at least lpBase can be used to have a correct landing pad but beside that I seems to not improve much

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

Reviewers

1 more reviewer

@lolgablolgablolgab left review comments

Reviewers whose approvals may not affect merge requirements

At least 1 approving review is required to merge this pull request.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@WojciechMazur@lolgab

[8]ページ先頭

©2009-2025 Movatter.jp