This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libmudflap/40778] [4.5 Regression] Mudflap instrumentation missing in cloned function.
- From: "tjruwase at google dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 16 Jul 2009 19:24:43 -0000
- Subject: [Bug libmudflap/40778] [4.5 Regression] Mudflap instrumentation missing in cloned function.
- References: <bug-40778-17902@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from tjruwase at google dot com 2009-07-16 19:24 -------
The problem is that mudflap avoids instrumenting synthetic functions, i.e
DECL_ARTIFICIAL(decl) . Since cloned functions are synthetic functions, they
are
not instrumented by the 2nd mudflap pass.
A possible fix would be for mudflap to determine that a synthetic function is
actually a clone of a non synthetic function. Unfortunately it is not obvious
to me how to obtain this information, since the relevant field is cleared
immediately after use. For example, cgraph_node(fndecl)->clone_of which points
to the cgraph_node of the original function is cleared once the clone is
materialized in cgraph_materialize_clone() and save_inline_function_body().
Is there a way to identified cloned functions after materialization ?.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40778