<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hello,<div><br></div><div>I have declared a&nbsp;<span class="Apple-style-span" style="color: rgb(63, 110, 116); font-family: Monaco; font-size: 12px; ">GiNaC</span><span class="Apple-style-span" style="color: rgb(63, 110, 116); font-family: Monaco; font-size: 12px; "><span style="color: #000000">::parser </span></span><span class="Apple-style-span" style="color: rgb(63, 110, 116); font-family: Monaco; font-size: 12px; ">l_parser</span><span class="Apple-style-span" style="color: rgb(63, 110, 116); font-family: Monaco; font-size: 12px; "><span style="color: #000000">; in a class method which is called in a multithread.</span></span></div><div><span class="Apple-style-span" style="color: rgb(63, 110, 116); font-family: Monaco; font-size: 12px; "><span style="color: #000000">If I show valgrind report I see:</span></span></div><div><span class="Apple-style-span" style="color: rgb(63, 110, 116); font-family: Monaco; font-size: 12px; "><span style="color: #000000"><br></span></span></div><div><span class="Apple-style-span" style="color: rgb(63, 110, 116); font-family: Monaco; font-size: 12px; "><span style="color: #000000"><div>==1084== Possible data race during write of size 1 at 0x1f06e4 by thread #3</div><div>==1084== &nbsp; &nbsp;at 0x1B30F6: std::string::_Rep::_M_set_length_and_sharable(unsigned long) (in /usr/lib/libstdc++.6.0.4.dylib)</div><div>==1084== &nbsp; &nbsp;by 0x1B39FB: std::string::_M_mutate(unsigned long, unsigned long, unsigned long) (in /usr/lib/libstdc++.6.0.4.dylib)</div><div>==1084== &nbsp; &nbsp;by 0x1B3A43: std::string::_M_replace_safe(unsigned long, unsigned long, char const*, unsigned long) (in /usr/lib/libstdc++.6.0.4.dylib)</div><div>==1084== &nbsp; &nbsp;by 0x1B3AE7: std::string::assign(char const*, unsigned long) (in /usr/lib/libstdc++.6.0.4.dylib)</div><div>==1084== &nbsp; &nbsp;by 0x115D139: GiNaC::lexer::lexer(std::istream*, std::ostream*, std::ostream*) (in /Developer/opt/Ginac/1.5.8/lib/libginac-1.5.0.dylib)</div><div>==1084== &nbsp; &nbsp;by 0x1157CC2: GiNaC::parser::parser(std::map&lt;std::string, GiNaC::ex, std::less&lt;std::string&gt;, std::allocator&lt;std::pair&lt;std::string const, GiNaC::ex&gt; &gt; &gt; const&amp;, bool, std::map&lt;std::pair&lt;std::string, unsigned long&gt;, GiNaC::ex (*)(std::vector&lt;GiNaC::ex, std::allocator&lt;GiNaC::ex&gt; &gt; const&amp;), std::less&lt;std::pair&lt;std::string, unsigned long&gt; &gt;, std::allocator&lt;std::pair&lt;std::pair&lt;std::string, unsigned long&gt; const, GiNaC::ex (*)(std::vector&lt;GiNaC::ex, std::allocator&lt;GiNaC::ex&gt; &gt; const&amp;)&gt; &gt; &gt; const&amp;) (in /Developer/opt/Ginac/1.5.8/lib/libginac-1.5.0.dylib)</div><div><br></div><div><span id="result_box" class="short_text"><span style="background-color: rgb(255, 255, 255);" title="">When will be ginac thread safe and is there such a thing?</span></span></div><div><span id="result_box" class="short_text"><span style="background-color: rgb(255, 255, 255);" title="">Thx</span></span></div><div><span id="result_box" class="short_text"><span style="background-color: rgb(255, 255, 255);" title=""><br></span></span></div><div><span id="result_box" class="short_text"><span style="background-color: rgb(255, 255, 255);" title="">Phil</span></span></div></span></span></div></body></html>