Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
4.8.5, 5.2.1
-
None
-
Linux
-
8c2ca33073f20e1fe552bd8b5f663aec5b8a634d
Description
From this backtrace it is apparent that QString:toDouble() can eventually call pow5mult(). (line numbers are from 4.8.5 but it looks like 5.2.1 has the same issue).
==649== at 0xB27F5BD: pow5mult(Bigint*, int) (qlocale_tools.cpp:1122)
==649== by 0xB280DA6: qstrtod(char const*, char const*, bool) (qlocale_tools.cpp:1908)
==649== by 0xB27A236: QLocalePrivate::bytearrayToDouble(char const*, bool*, bool*) (qlocale.cpp:3032)
==649== by 0xB279DC4: QLocalePrivate::stringToDouble(QString const&, bool*, QLocalePrivate::GroupSeparatorMode) const (qlocale.cpp:2976)
==649== by 0xB2AD306: QString::toDouble(bool*) const (qstring.cpp:5870)
pow5mult() uses a static variable called p5s with no protection so pow5mult is not reentrant therefore QString::toDouble() is not reentrant as claimed in the docs.