runtime: extract out allocate_stack_0
to work around a "Local Exec" TLS model issue and prevent segfaulting
#1625
Loading