[Bug target/78631] [Intel MPX] libmpxwrappers shared library leads to a non-bounds-preserving memcpy()

hjl.tools at gmail dot com gcc-bugzilla@gcc.gnu.org
Tue Dec 6 15:44:00 GMT 2016


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

--- Comment #8 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to Ilya Enkovich from comment #7)
> (In reply to H.J. Lu from comment #6)
> > -z bndplt is needed to call external functions with bounds.  But
> > it isn't needed for internal function calls.
> 
> That doesn't explain why we need a hack you propose. Code like 
> 
> void *fn1 (void *p) {
>   return fn2(p);
> }
> 
> should work fine for any fn1 and fn2 compiled with MPX. Both internal and
> external functions should work. If call goes through PLT then BNDPLT should
> be used. If it's not then it's a bug in toolchain.

MPX wrapper library doesn't call external functions with bounds
and there is no need to use PLT to call internal functions within
MPX wrapper library.


More information about the Gcc-bugs mailing list