Modify

Opened 7 years ago

Closed 5 years ago

Last modified 12 months ago

#4889 closed Bugs (fixed)

path locale-related functions are not thread-safe

Reported by: andysem Owned by: bemandawes
Milestone: To Be Determined Component: filesystem
Version: Boost 1.45.0 Severity: Problem
Keywords: Cc: raad@…

Description

Boost.Filesystem v.3 keeps the locale used by path objects in a function-local static object (see path_locale function in path.cpp). If multiple threads use path methods that involve locale (such as string(), wstring(), converting constructors or assignment from strings), the code may use a not yet constructed locale object or leak the locale. The locale object must be protected with call_once or similar technique.

Attachments (0)

Change History (2)

comment:1 Changed 5 years ago by bemandawes

  • Resolution set to fixed
  • Status changed from new to closed

(In [76303]) Fix #4889, #6320, Locale codecvt_facet not thread safe on Windows. Move Windows, Mac OS X, locale and codecvt facet back to namespace scope. POSIX except OS X uses local static initialization (IE lazy) to ensure exceptions are catchable if environmental variables are misconfigured and to avoid use of locale("") if not actually used.

comment:2 Changed 12 months ago by raad@…

  • Cc raad@… added

Add Comment

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain bemandawes.
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.