diff --git a/CHANGES.md b/CHANGES.md index 5d3279a80c..d40aa62ff7 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -16,6 +16,7 @@ Bug Fixes --------- * [#1411](https://github.com/java-native-access/jna/pull/1411): Do not throw `Win32Exception` on success for empty section in `Kernel32Util#getPrivateProfileSection` - [@mkarg](https://github.com/mkarg). * [#1414](https://github.com/java-native-access/jna/pull/1414): Fix definition of `c.s.j.p.unix.X11.XK_Shift_R` - [@matthiasblaesing](https://github.com/matthiasblaesing). +* [#1323](https://github.com/java-native-access/jna/issues/1323). Fix crashes in direct callbacks on mac OS aarch64 - [@matthiasblaesing](https://github.com/matthiasblaesing). Release 5.10.0 ============== diff --git a/appveyor.yml b/appveyor.yml index 9c70df44d6..5f062ed88b 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -31,7 +31,7 @@ install: # Must prepend cygwin PATH to avoid "cygheap base mismatch" from Git\usr\bin\sed - cmd: set PATH=C:\cygwin64;C:\cygwin64\bin;%JAVA_HOME%\bin;%PATH%; - cmd: choco install -y -f -i %CHOCO_PACKAGES% - - cmd: '%CYGWIN_SETUP% --root C:\cygwin64 --local-package-dir C:\cygwin64\packages --quiet-mode --no-desktop --no-startmenu --packages %CYGWIN_PACKAGES%' + - cmd: '%CYGWIN_SETUP% --root C:\cygwin64 --local-package-dir C:\cygwin64\packages --quiet-mode --no-desktop --no-startmenu --upgrade-also --packages %CYGWIN_PACKAGES%' # Setup msvc environment for: diff --git a/contrib/platform/test/com/sun/jna/platform/mac/IOKitTest.java b/contrib/platform/test/com/sun/jna/platform/mac/IOKitTest.java index 02ac90f9cf..6ab22aa844 100644 --- a/contrib/platform/test/com/sun/jna/platform/mac/IOKitTest.java +++ b/contrib/platform/test/com/sun/jna/platform/mac/IOKitTest.java @@ -30,6 +30,7 @@ import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; +import static org.junit.Assume.assumeTrue; import java.util.HashSet; import java.util.Set; @@ -166,8 +167,7 @@ public void testIteratorParentChild() { // Get device name String controllerName = controllerDevice.getName(); - // Root controllers always begin with "AppleUSB" - assertEquals("AppleUSB", controllerName.substring(0, 8)); + assertNotNull(controllerName); // Get the first child, to test vs. iterator boolean testFirstChild = true; @@ -177,7 +177,6 @@ public void testIteratorParentChild() { IOIterator childIter = controllerDevice.getChildIterator(IO_SERVICE); IORegistryEntry childDevice = childIter.next(); while (childDevice != null) { - assertTrue(childDevice.conformsTo("IOUSBDevice")); long childId = childDevice.getRegistryEntryID(); assertTrue(childId > 19); assertFalse(uniqueEntryIdSet.contains(childId)); diff --git a/native/callback.c b/native/callback.c index b127ce41d8..99a9e831a3 100644 --- a/native/callback.c +++ b/native/callback.c @@ -288,7 +288,7 @@ create_callback(JNIEnv* env, jobject obj, jobject method, case 'D': cb->fptr_offset = OFFSETOF(env, CallDoubleMethod); break; default: cb->fptr_offset = OFFSETOF(env, CallObjectMethod); break; } - status = ffi_prep_cif_var(&cb->java_cif, java_abi, 2, argc+3, java_return_type, cb->java_arg_types); + status = ffi_prep_cif_var(&cb->java_cif, java_abi, 3, argc+3, java_return_type, cb->java_arg_types); if (!ffi_error(env, "callback setup (2)", status)) { ffi_prep_closure_loc(cb->closure, &cb->cif, dispatch_callback, cb, cb->x_closure);