self icon indicating copy to clipboard operation
self copied to clipboard

Sparc: Don't use `%g7` in the JIT compiled code

Open nbuwe opened this issue 10 months ago • 0 comments

Self JIT compiler on sparc emits code that uses %g7 register. But that register is reserved for the use by the system and is commonly used by the ELF TLS (thread local storage).

This actually happens even though Self does not use pthreads, b/c jemalloc, the default malloc on NetBSD, does use TLS, and JIT code clobbers it and malloc crashes. The kludge I used while making the sparc port compile again was to use a different malloc implementation.

nbuwe avatar Aug 18 '23 23:08 nbuwe