[PATCH V2] ABI changes for MPX.

Eli Zaretskii eliz@gnu.org
Fri Dec 18 15:11:00 GMT 2015


> From: "Tedeschi, Walfred" <walfred.tedeschi@intel.com>
> CC: "brobecker@adacore.com" <brobecker@adacore.com>,	"gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
> Date: Thu, 17 Dec 2015 16:44:47 +0000
> 
> You issue the command "return a", where a is a pointer.
> BND0 should contain that boundary of a, but it will in fact return any value presented in the register at that moment.
> In this way application will be in a not good state.  Continuing the execution the user might have a bound violation due to the return.
> This behaviour is when the " mpx-bnd-init-on-return" is 0.
> 
> In case the " mpx-bnd-init-on-return" is 1 the BND0 will be set to zero, INIT state, and the pointer a will be able to access the whole memory.

Thanks, I understand now.  So why would a GDB user want to set
mpx-bnd-init-on-return to zero?  The result will always be a bound
violation, no?



More information about the Gdb-patches mailing list