This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH V2] ABI changes for MPX.


> 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?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]