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 V7] amd64-mpx: initialize bnd register before performing inferior calls.


I just occurred to me that I think it's important that
we test what happens to the BND registers _after_ the
infcall finishes:

 #1 - by normal completion

 #2 - when it is interrupted midway, e.g., because the
      called function trips on a breakpoint.

I didn't find this in the current test.

I expect that in case #1, the BND registers are restored to
what they were before the infcall.  The test should exercise
this, by continuing execution after the infcall returns, and
checking that a bounds violation / lack of bounds violation,
is still detected / not detected as if the infcall didn't
happen.

Similarly, for #2, once gdb "silently stops" after being
resumed from the breakpoint hit, I think all registers are
restored, so the same testing would apply then.

You may also think about testing what should happen
to bounds checks done by the function that had the
breakpoint that interrupted the infcall, if you say, step
over some code inside that interrupted function.

Comprehensive testing like that would make it clearer how
the feature is meant to behave, and ensure it continues
working like that going forward.

Lastly, shouldn't the manual say something about all this?

Thanks,
Pedro Alves


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