This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH V2] ABI changes for MPX.
- From: Eli Zaretskii <eliz at gnu dot org>
- To: "Tedeschi\, Walfred" <walfred dot tedeschi at intel dot com>
- Cc: brobecker at adacore dot com, gdb-patches at sourceware dot org
- Date: Fri, 18 Dec 2015 17:12:09 +0200
- Subject: Re: [PATCH V2] ABI changes for MPX.
- Authentication-results: sourceware.org; auth=none
- References: <1450358624-11596-1-git-send-email-walfred dot tedeschi at intel dot com> <83bn9pyqv8 dot fsf at gnu dot org> <AC542571535E904D8E8ADAE745D60B1944507386 at IRSMSX104 dot ger dot corp dot intel dot com>
- Reply-to: Eli Zaretskii <eliz at gnu dot org>
> 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?