Author: Antonio Cuni <anto.c...@gmail.com>
Branch: vmprof-resolve_addr
Changeset: r93756:451e009ea2ec
Date: 2018-02-05 10:55 +0100
http://bitbucket.org/pypy/pypy/changeset/451e009ea2ec/

Log:    initialize the pointers in the very same way as the C version does;
        this is apparently part of the API of vmp_resolve_address

diff --git a/rpython/rlib/rvmprof/rvmprof.py b/rpython/rlib/rvmprof/rvmprof.py
--- a/rpython/rlib/rvmprof/rvmprof.py
+++ b/rpython/rlib/rvmprof/rvmprof.py
@@ -192,11 +192,10 @@
         with lltype.scoped_alloc(rffi.CCHARP.TO, name_len) as name_p:
             with lltype.scoped_alloc(rffi.CCHARP.TO, srcfile_len) as srcfile_p:
                 with lltype.scoped_alloc(rffi.INTP.TO, 1) as lineno_p:
-                    # XXX vmp_resolve_addr checks whether the first char is 0
-                    # before calling dladdr, not sure why. Investigate before
-                    # merging.
                     name_p[0] = '\0'
-                    srcfile_p[0] = '\0'
+                    srcfile_p[0] = '-'
+                    srcfile_p[1] = '\0'
+                    lineno_p[0] = rffi.cast(rffi.INT, 0)
                     res = self.cintf.vmp_resolve_addr(addr, name_p, name_len,
                                                       lineno_p, srcfile_p, 
srcfile_len)
                     if res != 0:
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to