SRI-CSL / yices2_java_bindings

Java bindings for Yices 2.
MIT License
4 stars 2 forks source link

New M1 macs have a bug. #5

Open ianamason opened 2 years ago

ianamason commented 2 years ago

OK so if you build this puppy, on a M1 mac, ant test will likely crash.

    [junit] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0 sec
    [junit]
    [junit] Testcase: com.sri.yices.TestYices:testBoolTerms:    Caused an ERROR
    [junit] Forked Java VM exited abnormally. Please note the time in the report does not reflect the time until the VM exit.
    [junit] junit.framework.AssertionFailedError: Forked Java VM exited abnormally. Please note the time in the report does not reflect the time until the VM exit.
    [junit]
    [junit]
    [junit] Running com.sri.yices.TestYices
    [junit] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0 sec

and in you grovel around you will eventually find something like this (use the console).

Translated Report (Full Report Below)
-------------------------------------

Process:               java [4693]
Path:                  /Library/Java/JavaVirtualMachines/amazon-corretto-8.jdk/Contents/Home/jre/bin/java
Identifier:            java
Version:               ???
Code Type:             ARM-64 (Native)
Parent Process:        java [4639]
Responsible:           iTerm2 [581]
User ID:               503

Date/Time:             2022-08-11 08:51:07.2450 -0700
OS Version:            macOS 12.5 (21G72)
Report Version:        12
Anonymous UUID:        4CD424E1-D7F0-44A5-81D6-B48C250B5985

Time Awake Since Boot: 1600 seconds

System Integrity Protection: enabled

Crashed Thread:        2

Exception Type:        EXC_BAD_ACCESS (SIGKILL (Code Signature Invalid))
Exception Codes:       UNKNOWN_0x32 at 0x0000000105d2c000
Exception Codes:       0x0000000000000032, 0x0000000105d2c000
Exception Note:        EXC_CORPSE_NOTIFY

Termination Reason:    Namespace CODESIGNING, Code 2 

VM Region Info: 0x105d2c000 is in 0x105d2c000-0x105d64000;  bytes after start: 0  bytes before end: 229375
      REGION TYPE                    START - END         [ VSIZE] PRT/MAX SHRMOD  REGION DETAIL
      __LINKEDIT                  105d18000-105d2c000    [   80K] r--/rwx SM=COW  .../libnet.dylib
--->  mapped file                 105d2c000-105d64000    [  224K] r--/rwx SM=COW  ...t_id=a75b3635
      GAP OF 0x98000 BYTES
      __TEXT                      105dfc000-1063c0000    [ 5904K] r-x/rwx SM=COW  .../libjvm.dylib

and after some googling you find:

https://developer.apple.com/forums/thread/696460

https://developer.apple.com/documentation/security/updating_mac_software

and low and behold restarting the laptop fixes the problem. Way to go Apple.

ianamason commented 2 years ago

@BrunoDutertre fun.