Skip to content
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

Made cmark re-entrant by storing special chars data per parser object #176

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

Xadeck
Copy link

@Xadeck Xadeck commented Dec 18, 2019

Before this change, if you use cmark concurrently, you could run into concurrent access because the SPECIAL_CHARS table was globally shared with potential read and write.

This change stores the table per cmark_parser instance and solves the problem.

This bug was found at Google using thread sanitizer

@saraedum
Copy link

Is there anything that needs to be done here to get this change included into cmark-gfm?

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