[Openmcl-devel] A reproducible Rosetta2 crash

Ron Garret ron at flownet.com
Fri Feb 16 15:01:21 PST 2024


I've traced the problem down to CCL::MAKE-WRAPPER-OBSOLETE.  If you redefine that function so that it does nothing, then FINALIZE-INHERITANCE no longer crashes.  Of course, that is almost certainly not an actual fix, but it narrows the problem down to a fairly small bit of code.

More info: CCL::MAKE-WRAPPER-OBSOLETE does not actually produce the crash, it merely sets it up.  The crash itself happens after CCL::MAKE-WRAPPER-OBSOLETE returns.  You can force a crash by putting in a call to BREAK after CCL::MAKE-WRAPPER-OBSOLETE returns.

Maybe this is enough info for someone with more x86-assembler fu than me to figure out what is actually going on.  I think this might be worth pursuing because it's not out of the question that this is the bug that is causing the intermittent crashes previously observed.  If that is the case, then fixing this could make CCL reliable under Rosetta2, and that would be a Really Good Thing (tm).

rg


> On Feb 16, 2024, at 12:27 PM, Ron Garret <ron at flownet.com> wrote:
> 
> This is reliably reproducible running x86_64 CCL under Rosetta2:
> 
> ron at RMBA1 ~ % ~/devel/ccl/dx86cl64
> Clozure Common Lisp Version 1.12.1 (v1.12.1-10-gca107b94) DarwinX8664
> ? (finalize-inheritance (find-class 'standard-class))
> rosetta error: unexpectedly need to EmulateForward on a synchronous exception x86_rip=0x52776560442047 arm_pc=0x4303779228 num_insts=3 inst_index=2 x86 instruction bytes: 0x10036366705108273237 0x85581580638679157
> zsh: trace trap  ~/devel/ccl/dx86cl64
> 
> This call never crashes on a real x86, but crashes 100% of the time under Rosetta2.  AFAIK this is the first reliably reproducible discrepancy between the behavior of Rosetta2 and a real x86.
> 
> rg
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.clozure.com/pipermail/openmcl-devel/attachments/20240216/035e1cdf/attachment.htm>


More information about the Openmcl-devel mailing list