On Mon, 2013-08-26 at 09:49 -0700, Richard Henderson wrote: > On 08/22/2013 02:57 PM, Torvald Riegel wrote: > > On Thu, 2013-08-22 at 12:05 -0700, Richard Henderson wrote: > >> On 08/22/2013 11:39 AM, Torvald Riegel wrote: > >>> + /* Store edi for future HTM fast path retries. We use a stack slot > >>> + lower than the jmpbuf so that the jmpbuf's rip field will overlap > >>> + with the proper return address on the stack. */ > >>> + movl %edi, -64(%rsp) > >> > >> You havn't allocated the stack frame here, and you're storing > >> outside the redzone. This is invalid. > >> > >> Two possibilities: > >> > >> (1) always allocate the stack frame on entry to > >> the function (adds two register additions to > >> the htm fast path -- in the noise i'd think) > >> > >> (2) store the edi value in the non-htm path, with > >> the pr_HTMRetryableAbort bit or'd in. (adds an > >> extra store to the non-htm path; probably noise). > >> You'd want to mask out that bit when you reload it. > > > > Oops. Picked fix (2). Better now? > > > > Move the andl of edi down into the HAVE_AS_RTM block, above the orl of > HTMRetriedAfterAbort. Ok with that change.
Committed as r202101.