Project

Profile

Help

Bug #2436

closed

Multithreading bug in format-date()

Added by Michael Kay over 9 years ago. Updated almost 9 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Multithreading
Sprint/Milestone:
Start date:
2015-08-04
Due date:
% Done:

100%

Estimated time:
Legacy ID:
Applies to branch:
9.6
Fix Committed on Branch:
9.6
Fixed in Maintenance Release:
Platforms:

Description

When the ICU library is used for date formatting in format-date() (etc), there is a multithreading bug that may cause the wrong month-name or day-name to be output.

(Specifically, instances of the ICUNumberer class are reused and shared across threads, but the class has an instance-level field "cal" which is mutable.)

The observed effect is that XSLT3 test validation-0202 produces incorrect output in about 1 in 30 runs.

Actions #1

Updated by Michael Kay over 9 years ago

Turns out the problem is a bit harder to fix than I thought: the ICU class SimpleDateFormat turns out not to be thread-safe.

Actions #2

Updated by Michael Kay over 9 years ago

  • Status changed from New to Resolved

A patch has been committed on the 9.6 and 9.7 branches.

Actions #3

Updated by O'Neil Delpratt over 9 years ago

  • Status changed from Resolved to Closed
  • % Done changed from 0 to 100
  • Fixed in version set to 9.6.0.7

Bug fix applied in the Saxon 9.6.0.7 maintenance release.

Actions #4

Updated by O'Neil Delpratt almost 9 years ago

  • Applies to branch 9.6 added
  • Fix Committed on Branch 9.6 added
  • Fixed in Maintenance Release 9.6.0.7 added
Actions #5

Updated by O'Neil Delpratt almost 9 years ago

  • Sprint/Milestone set to 9.6.0.7

Please register to edit this issue

Also available in: Atom PDF