Author: Armin Rigo <ar...@tunes.org>
Branch: 
Changeset: r499:cb61cf4e30a9
Date: 2013-08-24 10:58 +0200
http://bitbucket.org/pypy/stmgc/changeset/cb61cf4e30a9/

Log:    stm_decode_abort_info: the current hack for strings doesn't really
        work. Need to think about a different one...

diff --git a/c4/extra.c b/c4/extra.c
--- a/c4/extra.c
+++ b/c4/extra.c
@@ -300,15 +300,16 @@
             case 3:    /* a string of bytes from the target object */
                 rps = *(char **)(object + offset);
                 offset = *fieldoffsets++;
-                if (rps) {
+                /* XXX think of a different hack: this one doesn't really
+                   work if we see stubs! */
+                if (rps && !(((gcptr)rps)->h_tid & GCFLAG_STUB)) {
                     /* xxx a bit ad-hoc: it's a string whose length is a
                      * long at 'offset', following immediately the offset */
                     rps_size = *(long *)(rps + offset);
-                    offset += sizeof(long);
                     assert(rps_size >= 0);
                     res_size = sprintf(buffer, "%zu:", rps_size);
                     WRITE_BUF(buffer, res_size);
-                    WRITE_BUF(rps + offset, rps_size);
+                    WRITE_BUF(rps + offset + sizeof(long), rps_size);
                 }
                 else {
                     WRITE_BUF("0:", 2);
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to