[Bug target/78631] [Intel MPX] libmpxwrappers shared library leads to a non-bounds-preserving memcpy()
ienkovich at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Dec 7 18:25:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78631
--- Comment #11 from Ilya Enkovich <ienkovich at gcc dot gnu.org> ---
(In reply to H.J. Lu from comment #10)
>
> MPX wrapper library isn't built with -z bndplt since it doesn't call
> external functions with bounds. But some internal functions, which
> need bounds, are called via PLT which clear bounds. It should call
> call those internal functions directly instead of via PLT.
Thanks for explanation. I thought we added '-fcheck-pointer-bounds -mmpx'
libmpxwrappers link flags but now I see we didn't. We also added tests to check
memcpy copies bounds correctly but didn't check memcpy detects bounds
violation. I suppose your patch is OK with such test added.
More information about the Gcc-bugs
mailing list