Opened 14 years ago

Closed 14 years ago

Last modified 13 years ago

#2713 closed Bugs (fixed)

Crash in perl_matcher::match_all_states() method - race condition

Reported by: lang@… Owned by: John Maddock
Milestone: Boost 1.40.0 Component: regex
Version: Boost 1.37.0 Severity: Problem
Keywords: Cc:

Description

In file perl_matcher_non_recursive.hpp is method perl_matcher::match_all_states() which contain static table 's_match_vtable'. If this method is called at first time, from more threads, table created in one thread can be skipped in other (due to dynamic code in table initialization), it causing crash of the following code:

matcher_proc_type proc = s_match_vtable[pstate->type];
...
if(!(this->*proc)()) {

because 'proc' is NULL

Tested with Visual Studio 2005

Change History (4)

comment:1 by John Maddock, 14 years ago

Resolution: fixed
Status: newclosed

(In [51103]) Fixes #2713: change table initialisation so that it's initialised statically.

comment:2 by anonymous, 13 years ago

Milestone: Boost 1.38.0Boost 1.40.0

Can someone make sure this get's in the next available release? It wasn't in 1.39.

comment:3 by John Maddock, 13 years ago

(In [55383]) Merge updates from Trunk. Fixes #2713.

in reply to:  3 comment:4 by Ryan Gallagher, 13 years ago

Replying to johnmaddock:

(In [55383]) Merge updates from Trunk. Fixes #2713.

Thanks John!

Note: See TracTickets for help on using tickets.