Author: fijal Branch: nogil-unsafe-2 Changeset: r91861:17d925b4fab8 Date: 2017-07-11 16:19 +0200 http://bitbucket.org/pypy/pypy/changeset/17d925b4fab8/
Log: make sure we allocate shadow stack diff --git a/rpython/memory/gctransform/shadowstack.py b/rpython/memory/gctransform/shadowstack.py --- a/rpython/memory/gctransform/shadowstack.py +++ b/rpython/memory/gctransform/shadowstack.py @@ -152,6 +152,13 @@ if tl_shadowstack.get_or_make_raw() == llmemory.NULL: allocate_shadow_stack() + + def thread_start(): + allocate_shadow_stack() + tl_synclock.get_or_make_raw() # reference the field at least once + + thread_start._always_inline_ = True + def allocate_shadow_stack(): root_stack_depth = 163840 root_stack_size = sizeofaddr * root_stack_depth @@ -175,6 +182,8 @@ self.thread_setup = thread_setup self.thread_run_ptr = getfn(thread_run, [], annmodel.s_None, minimal_transform=False) + self.thread_start_ptr = getfn(thread_start, [], annmodel.s_None, + minimal_transform=False) self.thread_die_ptr = getfn(thread_die, [], annmodel.s_None, minimal_transform=False) _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit