This is the mail archive of the
mailing list for the GDB project.
Re: [PATCH V5 2/2] Add mpx-bnd-init-on-return set/show command for inferior calls.
- From: Yao Qi <qiyaoltc at gmail dot com>
- To: Walfred Tedeschi <walfred dot tedeschi at intel dot com>
- Cc: palves at redhat dot com, brobecker at adacore dot com, gdb-patches at sourceware dot org
- Date: Tue, 26 Apr 2016 16:19:59 +0100
- Subject: Re: [PATCH V5 2/2] Add mpx-bnd-init-on-return set/show command for inferior calls.
- Authentication-results: sourceware.org; auth=none
- References: <1458310577-20021-1-git-send-email-walfred dot tedeschi at intel dot com>
Walfred Tedeschi <email@example.com> writes:
> When using the return command, execution of a function is aborted
> and present values are returned from that point. That can cause
> bound violations in the MPX context. To avoid such side-effects,
> a new setting ("mpx-bnd-init-on-return") was added to control
> the initialization of bound register when using the return command.
We need to investigate why does "return" cause bound violations. If the
violations are caused by the invalid or garbage return value, that is
expected, and it is a correct behavior to me. If the return value is
out of the bounds of registers settings, the violation is caused. Can we
tweak GDB to adjust the register settings to allow these memory accesses
in the "return"?