Skip to content

Disable LSan tls #11995

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

Closed
wants to merge 2 commits into from
Closed

Disable LSan tls #11995

wants to merge 2 commits into from

Conversation

iluuu1994
Copy link
Member

LSan crashes a lot recently, and it seems to be caused by tls. Since we're not actually making use of C11s _Thread_local we can set the use_tls=0 option. This causes a false positive in dlopen() that apprently uses thread locals. We suppress this with __lsan_disable()/__lsan_enable().

This might also cause new leaks in other libraries, we'll have to run CI to see. 🙂

/cc @ju1ius

LSan crashes a lot recently, and it seems to be caused by tls. Since we're not
actually making use of C11s _Thread_local we can set the use_tls=0 option. This
causes a false positive in dlopen() that apprently uses thread locals. We
suppress this with __lsan_disable()/__lsan_enable().

Co-authored-by: ju1ius <[email protected]>
@iluuu1994 iluuu1994 requested a review from TimWolla as a code owner August 18, 2023 16:49
@iluuu1994 iluuu1994 removed the request for review from TimWolla August 18, 2023 16:49
@iluuu1994 iluuu1994 marked this pull request as draft August 18, 2023 16:49
@iluuu1994 iluuu1994 force-pushed the lsan-disable-tls branch 6 times, most recently from b85e109 to 5d6500d Compare August 18, 2023 21:46
@iluuu1994
Copy link
Member Author

Solved this by upgrading to ubuntu 23.04 in docker instead.

@iluuu1994 iluuu1994 closed this Aug 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant