jessewilson
05/30/2023, 5:37 PMCrashed Thread:        5
Exception Type:        EXC_BAD_ACCESS (SIGBUS)
Exception Codes:       KERN_PROTECTION_FAILURE at 0x000000016b0e1120
Exception Codes:       0x0000000000000002, 0x000000016b0e1120
Termination Reason:    Namespace SIGNAL, Code 10 Bus error: 10
Terminating Process:   exc handler [67893]
VM Region Info: 0x16b0e1120 is in 0x16b0e0000-0x16b0e4000;  bytes after start: 4384  bytes before end: 11999
      REGION TYPE                    START - END         [ VSIZE] PRT/MAX SHRMOD  REGION DETAIL
      Stack                       16b058000-16b0e0000    [  544K] rw-/rwx SM=PRV  thread 4
--->  STACK GUARD                 16b0e0000-16b0e4000    [   16K] ---/rwx SM=NUL  ... for thread 5
      Stack                       16b0e4000-16b16c000    [  544K] rw-/rwx SM=PRV  thread 5Worker.start()Workerkevin.cianfarini
05/30/2023, 5:48 PMWorkerrusshwolf
05/30/2023, 8:16 PMjessewilson
05/30/2023, 9:05 PMAlexander Shabalin [JB]
05/31/2023, 1:53 PMimport platform.Foundation.*
…
    val thread = NSThread {
        println("Hello from the other thread")
        …
    }
    thread.stackSize = …
    thread.start()
…pthreadsimport kotlinx.cinterop.*
import platform.posix.*
…
    memScoped {
        val thread = alloc<pthread_tVar>()
        val attr = alloc<pthread_attr_t>()
        pthread_attr_init(attr.ptr)
        pthread_attr_setstacksize(attr.ptr, …)
        pthread_create(thread.ptr, attr.ptr, staticCFunction<COpaquePointer?, COpaquePointer?> {
            println("Hello from the other thread")
            …
            null
        }, null)
        pthread_attr_destroy(attr.ptr)
    }
…