Actions
Bug #6226
closedRace condition initialising UnicodeBlocks class
Start date:
2023-10-18
Due date:
% Done:
0%
Estimated time:
Legacy ID:
Applies to branch:
10, 11, 12, trunk
Fix Committed on Branch:
11, 12, trunk
Fixed in Maintenance Release:
Platforms:
.NET, Java
Description
Seen in v9.9.1-8 but the code is the same in v12.3
There is a potential race condition when readBlocks() is called in net.sf.saxon.regex.UnicodeBlocks. Because the blocks instance variable is set at the start of readBlocks(), there is the potential for another thread to read it and find it populated, partially populated or empty depending on timing.
I suggest changing it to use the Initialization-on-demand holder idiom in a similar way to issue https://saxonica.plan.io/issues/6225
Updated by Michael Kay about 1 year ago
Categories.java could also do with the same treatment.
Updated by Michael Kay about 1 year ago
- Status changed from New to Resolved
- Assignee set to Michael Kay
- Applies to branch trunk added
- Applies to branch deleted (
9.9) - Fix Committed on Branch 11, 12, trunk added
- Platforms .NET, Java added
Resolved as suggested.
Updated by O'Neil Delpratt 12 months ago
- Fixed in Maintenance Release 12.4 added
Bug fix applied in the Saxon 12.4 Maintenance release. Leaving it marked as 'Resolved' until fix applied on Saxon 11.
Please register to edit this issue
Actions