John Maddock wrote:
Regex is thread safe in following sense: given a const regex object, you can safely share that object between multiple threads.
However, your backtrace indicates that the problem occurs during regex construction: this is a situation *you* have to deal with (no matter what the data type), the thread safety guarantees only kick in once the object has been constructed, it's up to you to ensure that no race condition occurs during the construction. Your second link above indicates a couple of methods you could use to achieve this.
Sorry for jumping into this discussion, since I am not very knowledgable in the use of the regex library. But the buzzwords: "construction", "thread" and "local static" alerted me. There was a bug in the spirit library that seemingly had the same attributes attached. A function contained a local static object. If this is the case in regex library too this should be changed, since such usage is not thread safe. If this is not the case, please simply ignore my post since it does not apply. Roland