Skip to content

ExtractionExceptions is a non-thread-safe List<string> accessed from concurrent threads #152

Description

@imnasnainaec

ExtractionExceptions is declared as static List<string>. When ExtractStringsFromCode is called from concurrent threads, multiple threads may call AddRange on the same list simultaneously, causing data corruption.

Fix: Change ExtractionExceptions from List<string> to ConcurrentBag<string> and replace AddRange calls with individual Add calls.

Files affected: src/L10NSharp/XLiffUtils/XliffLocalizationManager.cs

(Part of #135.)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions