function has behaviour (is undefined) that differs between Kotlin Native's old and new memory models. In order to solve this an array has to be manually allocated in a memory scope, each Kotlin String is mapped to the array as a CPointer, and a
null
is appended at the end. Below is an example of the solution: