[pypy-commit] pypy sandbox-2: some changes lost in the maze of merges

arigo pypy.commits at gmail.com
Mon Aug 26 16:32:04 EDT 2019


Author: Armin Rigo <arigo at tunes.org>
Branch: sandbox-2
Changeset: r97282:f87b640630bf
Date: 2019-08-26 18:15 +0200
http://bitbucket.org/pypy/pypy/changeset/f87b640630bf/

Log:	some changes lost in the maze of merges

diff --git a/rpython/rlib/rsiphash.py b/rpython/rlib/rsiphash.py
--- a/rpython/rlib/rsiphash.py
+++ b/rpython/rlib/rsiphash.py
@@ -123,8 +123,11 @@
 
     def compute_result_annotation(self):
         translator = self.bookkeeper.annotator.translator
-        if translator.config.translation.reverse_debugger:
-            return    # ignore and use the regular hash, with reverse-debugger
+        # you should not call enable_siphash24() when translating with the
+        # reverse-debugger, or with sandbox.
+        assert not translator.config.translation.reverse_debugger
+        assert not translator.config.translation.sandbox
+        #
         if hasattr(translator, 'll_hash_string'):
             assert translator.ll_hash_string == ll_hash_string_siphash24
         else:
diff --git a/rpython/rtyper/lltypesystem/rffi.py b/rpython/rtyper/lltypesystem/rffi.py
--- a/rpython/rtyper/lltypesystem/rffi.py
+++ b/rpython/rtyper/lltypesystem/rffi.py
@@ -1104,6 +1104,7 @@
         i += 1
     return s.build(), i
 
+ at sandbox_review(reviewed=True)
 def utf82wcharp(utf8, utf8len, track_allocation=True):
     from rpython.rlib import rutf8
 
@@ -1115,6 +1116,7 @@
     for ch in rutf8.Utf8StringIterator(utf8):
         w[index] = unichr(ch)
         index += 1
+    assert index == utf8len
     w[index] = unichr(0)
     return w
 utf82wcharp._annenforceargs_ = [str, int, bool]


More information about the pypy-commit mailing list