[Bug c/68337] [MPX] memcpy() for arrays with function pointers results in huge resource usage and binaries

ienkovich at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Nov 16 11:05:00 GMT 2015


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68337

--- Comment #1 from Ilya Enkovich <ienkovich at gcc dot gnu.org> ---
The problem is that memcpy is inlined before instrumentation takes place.  This
causes a lot of statements to copy bounds and thus we get a huge function and
significant compilation time.

One possible solution is to not inline memcpy.  Actually I don't see why we do
it.  Seems it always happen when size of copied data is known.

Another solution is to use wrapper function to copy bounds.  This function is
not in libmpx yet (it is currently on review) and I don't think it will be
ported to GCC5.


More information about the Gcc-bugs mailing list