From: David P G. <gr...@us...> - 2014-10-20 22:32:47
|
Erik Brangs <eri...@gm...> wrote on 10/19/2014 10:53:49 AM: > > On 19.10.2014 14:50, Erik Brangs wrote: > > The diff also contains changes for OptExceptionTable to compute > the exact set of handlers for joined blocks. The changes fix the > issue but I'm not sure if that is the right way to go about it. > The "fix" that I posted is incorrect. It causes failures in the > OptTestHarnessTest unit test. > > My current approach to fix the problem in OptExceptionTable is to > just refrain from adding any catch blocks to the table that don't > have a machine code offset. This seems like a safe solution. > Yes, I think this second approach should not break anything be a safe solution (ie, will not make anything worse than what I'd guess the current code is doing which is putting in an entry with 0 for the machine code offset, which would be quite problematic if we ever actually tried to resume execution at a "catch block" that was also the method prologue). I suppose you could encode some form of error value for the machine code offset instead of dropping the entry entirely to allow the exception delivery code to detect that it would like to deliver the code to a catch block that the opt compiler decided was unreachable. --dave |