ExtractionExceptions is a non-thread-safe List<string> accessed from concurrent threads
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 82/100
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.
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.)
- Dominant language
- C#
- Stars
- 3
- Forks
- 10
- Avg merge
- 4d 12h
- Merged PRs (30d)
- 9
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.
More from sillsdev/l10nsharp
-
Difficulty 3/5 1-2 days Newbie friendliness 72/100
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 52/100
-
enhancement
Difficulty 3/5 1-2 days Newbie friendliness 68/100
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 45/100
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 35/100
All issues in sillsdev/l10nsharp
Similar issues
-
type/automation type/tech-debt
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
t/bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
ci-failure-cause test-failure
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
area:auth FE mvp P3
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
klasolsson81/jobbliggaren#1788 ·