Skip to content

gh-154577: Fix data race in Modules/cjkcodecs/multibytecodec.c#154578

Open
xxyzz wants to merge 1 commit into
python:mainfrom
xxyzz:tsan-0001
Open

gh-154577: Fix data race in Modules/cjkcodecs/multibytecodec.c#154578
xxyzz wants to merge 1 commit into
python:mainfrom
xxyzz:tsan-0001

Conversation

@xxyzz

@xxyzz xxyzz commented Jul 24, 2026

Copy link
Copy Markdown

Prevent race by adding @critical_section to functions that have MultibyteIncrementalEncoderObject or
MultibyteIncrementalDecoderObject argument

Fix TSAN-0001 from gh-153852

@BHUVANSH855 BHUVANSH855 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It looks like the failing Docs job is caused by these :c:type: references. Since MultibyteIncrementalEncoderObject and MultibyteIncrementalDecoderObject are internal implementation types rather than documented C API types, Sphinx can't resolve them and reports unresolved c:type references.

Would it make sense to use code literals (MultibyteIncrementalEncoderObject / MultibyteIncrementalDecoderObject) or simply describe them as the incremental encoder/decoder objects instead? That should avoid the documentation warning while still conveying the intent.

Prevent race by adding `@critical_section` to functions that have
`MultibyteIncrementalEncoderObject` or
`MultibyteIncrementalDecoderObject` argument

Fix TSAN-0001 from pythongh-153852
@xxyzz

xxyzz commented Jul 26, 2026

Copy link
Copy Markdown
Author

Thanks! Docs check should pass now.

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.

2 participants