Fix some thread sanitizer warnings in C++ runtime by jcking · Pull Request #3309 · antlr/antlr4

Skip to content

Navigation Menu

Sign in

Appearance settings

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

Conversation

@jcking

Copy link

Collaborator

@jcking jcking commented

Oct 15, 2021

There are some shared global states in the C++ runtime, specifically in the ATN, that cause thread sanitizer warnings. This pull request switches those use std::atomic.

@jcking jcking force-pushed the cpp-runtime-thread-safety branch 2 times, most recently from edee543 to 5bc8e01 Compare

October 18, 2021 14:16

@jcking

Copy link

Collaborator Author

jcking commented

Oct 18, 2021

@mike-lischke

Copy link

Member

Thanks for the PR. Can you also add yourself to the contributors.txt file?

@jcking

Copy link

Collaborator Author

jcking commented

Oct 19, 2021

Thanks for the PR. Can you also add yourself to the contributors.txt file?

Done.

@jcking

Copy link

Collaborator Author

jcking commented

Oct 19, 2021

Thanks for the PR. Can you also add yourself to the contributors.txt file?

Done.

Actually, I added it to #3311 instead, but same outcome. Both are TSAN fixes.

@mike-lischke

Copy link

Member

Please add that to this PR (too). We may not accept both patches.

@jcking jcking force-pushed the cpp-runtime-thread-safety branch from 5bc8e01 to f68a89d Compare

October 22, 2021 15:52

@jcking

Copy link

Collaborator Author

jcking commented

Oct 22, 2021

Please add that to this PR (too). We may not accept both patches.

Done.

@jcking jcking force-pushed the cpp-runtime-thread-safety branch from f68a89d to 0d0e7b4 Compare

October 22, 2021 15:53

@mike-lischke

Copy link

Member

@parrt Another C++ only patch, ready to be merged.

@parrt parrt added this to the 4.9.3 milestone

Oct 31, 2021

@parrt parrt merged commit 6ab9d0f into antlr:master

Oct 31, 2021

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

Reviewers

1 more reviewer

@mike-lischke mike-lischke mike-lischke approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Projects

None yet

Milestone

4.9.3

Development

Successfully merging this pull request may close these issues.

3 participants

@jcking @mike-lischke @parrt