ExtractionExceptions is a non-thread-safe List<string> accessed from concurrent threads
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 3
- Forks
- 10
- Avg merge
- 4d 12h
- Merged PRs (30d)
- 9
Description
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.)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Open src/L10NSharp/XLiffUtils/XliffLocalizationManager.cs and inspect ExtractionExceptions and the AddRange calls used by ExtractStringsFromCode. Change the collection and additions as specified, then verify that concurrent calls no longer share a non-thread-safe list or corrupt exception data.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 82/100