librustc_span has a concurrency bug #69261
Labels
A-parallel-compiler
Area: parallel compiler
C-bug
Category: This is a bug.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
librustc_span contains a concurrency bug. Even though, rustc works without any problem.
(I guess rustc process does not use multiples threads to load file to sourcemap.)
rust/src/librustc_span/source_map.rs
Lines 216 to 261 in 0176a9e
When multiple threads invoked this method at a time, it results in overlapping spans.
(Because the lock is released while analyzing the source file)
Meta
Simple fix: https://github.com/swc-project/swc/pull/672/files#diff-8d69cef1163ff9667c130830b15da62bL181-L188
The text was updated successfully, but these errors were encountered: