Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
runtime: extract out
allocate_stack_0
to work around a "Local Exec"…
… TLS model issue and prevent segfaulting `allocate_stack_0` writes the allocated stack to `ia2_stackptr_0`. Previously, this was done inline in `init_stacks_and_setup_tls`, which is defined in the main compartment with `INIT_RUNTIME`, and thus may sometimes use the "Local Exec" TLS model and thus use a different thread-local address. Moving this to `allocate_stack_0` in `libia2` forces it to use the correct GOT thread local. This is a workaround to #457, but doesn't actually fix the root issue. It does successfully prevent compartmentalized `dav1d` from segfaulting, though.
- Loading branch information