From: zye2-sc <140619768+zye2-sc@users.noreply.github.com> Date: Fri, 31 Jan 2025 20:40:00 +0000 (+0100) Subject: Disable go closures on Android (#877) X-Git-Tag: upstream/3.4.7~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a0d8074a672312dbc757320d8bc42e39aa5b3d9a;p=platform%2Fupstream%2Flibffi.git Disable go closures on Android (#877) * x18 register shouldn't be used on Android due to the shadow call stack feature in llvm * https://source.android.com/docs/security/test/shadow-call-stack --- diff --git a/src/aarch64/ffitarget.h b/src/aarch64/ffitarget.h index d5622e1..2ab9564 100644 --- a/src/aarch64/ffitarget.h +++ b/src/aarch64/ffitarget.h @@ -83,8 +83,8 @@ typedef enum ffi_abi #if defined (__APPLE__) #define FFI_EXTRA_CIF_FIELDS unsigned aarch64_nfixedargs -#elif !defined(_WIN32) -/* iOS and Windows reserve x18 for the system. Disable Go closures until +#elif !defined(_WIN32) && !defined(__ANDROID__) +/* iOS, Windows and Android reserve x18 for the system. Disable Go closures until a new static chain is chosen. */ #define FFI_GO_CLOSURES 1 #endif