Author: Armin Rigo <[email protected]>
Branch: stmgc-c7
Changeset: r70112:3ada12cdea0e
Date: 2014-03-20 13:20 +0100
http://bitbucket.org/pypy/pypy/changeset/3ada12cdea0e/

Log:    Found out and explain why we get rare crashes in pypy if we enable
        this 'stm_ignored'.

diff --git a/rpython/rtyper/lltypesystem/rstr.py 
b/rpython/rtyper/lltypesystem/rstr.py
--- a/rpython/rtyper/lltypesystem/rstr.py
+++ b/rpython/rtyper/lltypesystem/rstr.py
@@ -377,14 +377,18 @@
         # special non-computed-yet value.
         if not s:
             return 0
-        with stm_ignored:
-            x = s.hash
+        #with stm_ignored:
+        x = s.hash
         if x == 0:
             x = _hash_string(s.chars)
             if x == 0:
                 x = 29872897
-            with stm_ignored:
-                s.hash = x
+            # XXX STM note: we would like this write to be stm-ignored,
+            # but we can't, because ll_strfasthash() might later miss
+            # the written value and return 0 again (rarely).  Think
+            # again later about the best option.
+            #with stm_ignored:
+            s.hash = x
         return x
 
     def ll_length(s):
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to