Skip to content

[lldb][swift] Reduce scope of a SwiftReflectionContext #9765

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

Conversation

felipepiovezan
Copy link

In the changed function, there is a block of debug-only ifdef'ed code that is pretty heavyweight, and it may acquire a few locks along the way. The SwiftReflectionContext itself also has its own lock. This is triggering a deadlock in some ongoing work.

Reducing the scope of the reflection context allows the debug code to run without the lock acquired, and has no effect on release builds.

@felipepiovezan felipepiovezan requested a review from a team as a code owner December 18, 2024 21:36
@felipepiovezan
Copy link
Author

@swift-ci test

In the changed function, there is a block of debug-only ifdef'ed code
that is pretty heavyweight, and it may acquire a few locks along the
way. The SwiftReflectionContext itself also has its own lock. This is
triggering a deadlock in some ongoing work.

Reducing the scope of the reflection context allows the debug code to
run without the lock acquired, and has no effect on release builds.
@felipepiovezan felipepiovezan force-pushed the felipe/reduce_lock_scope branch from 988ac01 to 45b8e54 Compare December 18, 2024 21:37
@felipepiovezan
Copy link
Author

@swift-ci test

@adrian-prantl
Copy link

@swift-ci test windows

1 similar comment
@adrian-prantl
Copy link

@swift-ci test windows

@adrian-prantl adrian-prantl merged commit 10942e8 into swiftlang:swift/release/6.1 Dec 19, 2024
3 checks passed
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.

2 participants