Commit 6e576613 by Jonathan Wakely Committed by Jonathan Wakely

re PR libstdc++/51504 (Data race hunting instructions in manual do not work)

	PR libstdc++/51504
	* doc/xml/manual/debug.xml: Suggest using symbol interposition
	to override symbols using annotation macros.

From-SVN: r182943
parent ea0463d9
2012-01-06 Jonathan Wakely <jwakely.gcc@gmail.com>
PR libstdc++/51504
* doc/xml/manual/debug.xml: Suggest using symbol interposition
to override symbols using annotation macros.
2012-01-05 François Dumont <fdumont@gcc.gnu.org> 2012-01-05 François Dumont <fdumont@gcc.gnu.org>
* include/bits/hashtable_policy.h (_Hashtable_base<>::_M_eq()): * include/bits/hashtable_policy.h (_Hashtable_base<>::_M_eq()):
......
...@@ -207,14 +207,24 @@ ...@@ -207,14 +207,24 @@
redefining them will only affect inline functions and template redefining them will only affect inline functions and template
instantiations which are compiled in user code. This allows annotation instantiations which are compiled in user code. This allows annotation
of templates such as <code>shared_ptr</code>, but not code which is of templates such as <code>shared_ptr</code>, but not code which is
only instantiated in the library. only instantiated in the library. Code which is only instantiated in
In order to annotate <code>basic_string</code> reference counting it the library needs to be recompiled with the annotation macros defined.
is necessary to disable extern templates (by defining That can be done by rebuilding the entire
<code>_GLIBCXX_EXTERN_TEMPLATE=-1</code>) or to rebuild the <filename class="libraryfile">libstdc++.so</filename> file but a simpler
<code>.so</code> file. alternative exists for ELF platforms such as GNU/Linux, because ELF
symbol interposition allows symbols defined in the shared library to be
overridden by symbols with the same name that appear earlier in the
runtime search path. This means you only need to recompile the functions
that are affected by the annotation macros, which can be done by
recompiling individual files.
Annotating <code>std::string</code> and <code>std::wstring</code>
reference counting can be done by disabling extern templates (by defining
<code>_GLIBCXX_EXTERN_TEMPLATE=-1</code>) or by rebuilding the
<filename>src/string-inst.cc</filename> file.
Annotating the remaining atomic operations (at the time of writing these Annotating the remaining atomic operations (at the time of writing these
are in <code>ios_base::Init::~Init</code>, <code>locale::_Impl</code> and are in <code>ios_base::Init::~Init</code>, <code>locale::_Impl</code>,
<code>locale::facet</code>) requires rebuilding the <code>.so</code> file. <code>locale::facet</code> and <code>thread::_M_start_thread</code>)
requires rebuilding the relevant source files.
</para> </para>
<para> <para>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment