Closed
Description
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