To protect your data, the CISO officer has suggested users to enable GitLab 2FA as soon as possible.

Commit f7e54287 authored by John Zhang's avatar John Zhang
Browse files

updated pypy.patch

parent c82d71b6
...@@ -56,6 +56,44 @@ index f35e2b7..6aad4b8 100644 ...@@ -56,6 +56,44 @@ index f35e2b7..6aad4b8 100644
@replace_os_function('makedev') @replace_os_function('makedev')
@jit.dont_look_inside @jit.dont_look_inside
diff --git a/rpython/rlib/rthread.py b/rpython/rlib/rthread.py
index cf9fecf..ca5fa64 100644
--- a/rpython/rlib/rthread.py
+++ b/rpython/rlib/rthread.py
@@ -381,17 +381,18 @@ class ThreadLocalReference(ThreadLocalField):
def __init__(self, Cls, loop_invariant=False):
"NOT_RPYTHON: must be prebuilt"
+ from rpython.rtyper import rclass
self.Cls = Cls
unique_id = ThreadLocalReference._COUNT
ThreadLocalReference._COUNT += 1
- ThreadLocalField.__init__(self, lltype.Signed, 'tlref%d' % unique_id,
+ ThreadLocalField.__init__(self, rclass.OBJECTPTR, 'tlref%d' % unique_id,
loop_invariant=loop_invariant)
setraw = self.setraw
offset = self._offset
def get():
if we_are_translated():
- from rpython.rtyper import rclass
+ # from rpython.rtyper import rclass
from rpython.rtyper.annlowlevel import cast_base_ptr_to_instance
_threadlocalref_seeme(self)
ptr = llop.threadlocalref_get(rclass.OBJECTPTR, offset)
@@ -403,9 +404,10 @@ class ThreadLocalReference(ThreadLocalField):
def set(value):
assert isinstance(value, Cls) or value is None
if we_are_translated():
- from rpython.rtyper.annlowlevel import cast_instance_to_gcref
+ from rpython.rtyper.annlowlevel import cast_instance_to_gcref, cast_instance_to_base_ptr
gcref = cast_instance_to_gcref(value)
- value = lltype.cast_ptr_to_int(gcref)
+ # value = lltype.cast_ptr_to_int(gcref)
+ value = cast_instance_to_base_ptr(value)
setraw(value)
rgc.register_custom_trace_hook(TRACETLREF, _lambda_trace_tlref)
rgc.ll_writebarrier(_tracetlref_obj)
diff --git a/rpython/rlib/test/test_rposix.py b/rpython/rlib/test/test_rposix.py diff --git a/rpython/rlib/test/test_rposix.py b/rpython/rlib/test/test_rposix.py
index b3bc6ed..4edfcaa 100644 index b3bc6ed..4edfcaa 100644
--- a/rpython/rlib/test/test_rposix.py --- a/rpython/rlib/test/test_rposix.py
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment