Hi, we have an issue with Kotlin Native linuxArm32...
# kotlin-native
j
Hi, we have an issue with Kotlin Native linuxArm32Hfp .so producing
CP15 barrier instruction
errors on our Cortex a53 CPU ARMv8-A and our process is unable to load the .so at runtime - the process freezes. This issue did not occur on Kotlin 1.6.10 or earlier. The issue also is resolved by disabling the experimental memory model using
kotlin.native.binary.memoryModel=experimental
On the other hand, Kotlin 1.7.20 has the experimental memory model enabled by default, and KTOR library also requires it to be on and we depend on KTOR. I plan on creating a YouTrack ticket but would like to start by asking here first in case I get lucky.
n
With ARM v7 the
CP15 barrier
instruction was deprecated. What has most likely happened is that the instruction was removed in ARM v8, hence the errors are occurring. Have you tried running the program on a ARM v7 CPU to see if it works?
From where things stand you should create an issue about the use of a deprecated ARM instruction in the Kotlin Issue Tracker. Looks like from what has been mentioned that there is a Kotlin regression. I wonder why the Kotlin Native compiler is using a deprecated ARM instruction 🔍.
Our Kotlin binary works on our other ARMv7 devices
n
Do you run an ARM v8 version of Linux on the ARM v8 device?
j
The version of Linux is the same for both our ARMv7 and ARMv8 devices
n
Interesting, the Linux ARM version has no impact. So it is the hardware that is making the impact.