This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/78631] [Intel MPX] libmpxwrappers shared library leads to a non-bounds-preserving memcpy()
- From: "ienkovich at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 07 Dec 2016 18:25:20 +0000
- Subject: [Bug target/78631] [Intel MPX] libmpxwrappers shared library leads to a non-bounds-preserving memcpy()
- Auto-submitted: auto-generated
- References: <bug-78631-4@http.gcc.gnu.org/bugzilla/>
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.