cpp_regex_traits<charT>::toi() method fails in the MT case
Reported by: |
lsh123 |
Owned by: |
nobody |
Milestone:
|
|
Component:
|
None
|
Version:
|
None
|
Severity:
|
|
Keywords:
|
|
Cc:
|
|
cpp_regex_traits<charT>::toi() method fails to parse
the string correctly when it is used in multi-threaded
environment. Originally, I run into this problem in
regex parser code and traced it down to
cpp_regex_traits<charT>::toi() method (btw, this
happens on Linux only, Windows code goes thru a
different code path).
I believe that the problem is caused by the fact that
*buffered* m_pimpl->m_sbuf and m_pimpl->m_is are used
inside cpp_regex_traits<charT>::toi() method without
locking. Thus, if two threads are trying to use it in
the same time, it fails.
Change History
(4)
Status: |
assigned → closed
|