I'm finding that my gdbm module (based on ctypes) is infrequently (but it might be consistent) giving gibberish when run on pypy 1.4, but not when run on cpython 2.6 or cpython 3.1. More specifically, sometimes the keys come up looking like undefined memory. The values associated with those keys always seem OK. I believe I am comparing apples to apples - I'm using gdbm_ctypes with the cpython's too, even though they come with a module for some doing the same thing - for the sake of comparison. Is there a known problem with pypy's ctypes? The code is at http://stromberg.dnsalias.org/cgi-bin/viewvc.cgi/gdbm-ctypes/trunk/?root=svn The tests are at http://stromberg.dnsalias.org/cgi-bin/viewvc.cgi/backshift/trunk/?root=svn , and are a bit involved right now, but I could look into finding a minimal code snippet that shows the same problem.
On Thu, Dec 9, 2010 at 10:05 AM, Amaury Forgeot d'Arc <amauryfa@gmail.com> wrote:
Hi 2010/12/9 Dan Stromberg <drsalists@gmail.com>
Is there a known problem with pypy's ctypes?
Yes, several of them have already been fixed in trunk, especially about memory chunks being freed too early. -- Amaury Forgeot d'Arc
Using a trunk from late in the day yesterday, my gdbm_ctypes module is still giving gibberish keys sometimes, but only with pypy: find /usr/share/jpilot -print0 | (export dir=$(pwd)/save-dir-pypy; cd ../..; ./this-pypy ./backshift --save-directory "$dir" --backup) Using gdbm_ctypes /home/dstromberg/src/home-svn/backshift/trunk/treap.py:40: DeprecationWarning: setrecursionlimit deprecated sys.setrecursionlimit(min_heap_size) Creating backup id 1292083099.51-benchbox-Sat_Dec_11_07_58_19_2010-7bada40ed14b282b Inhaling filenames, readline0.__file__: /home/dstromberg/lib/readline0.py processing directory /usr/share/jpilot processing regular file /usr/share/jpilot/CalendarDB-PDat.pdb 5.88% done, 3.61 files/second, ETA Sat Dec 11 07:58:24 2010, processing regular file /usr/share/jpilot/MañanaDB.pdb 11.76% done, 5.55 files/second, ETA Sat Dec 11 07:58:22 2010, processing regular file /usr/share/jpilot/jpilotrc.green 17.65% done, 6.17 files/second, ETA Sat Dec 11 07:58:22 2010, processing regular file /usr/share/jpilot/jpilotrc.purple 23.53% done, 6.63 files/second, ETA Sat Dec 11 07:58:22 2010, processing regular file /usr/share/jpilot/ContactsDB-PAdd.pdb 29.41% done, 7.37 files/second, ETA Sat Dec 11 07:58:21 2010, processing regular file /usr/share/jpilot/MemoDB.pdb 35.29% done, 8.03 files/second, ETA Sat Dec 11 07:58:21 2010, processing regular file /usr/share/jpilot/jpilotrc.blue 41.18% done, 8.59 files/second, ETA Sat Dec 11 07:58:21 2010, processing regular file /usr/share/jpilot/ExpenseDB.pdb 47.06% done, 8.74 files/second, ETA Sat Dec 11 07:58:21 2010, processing regular file /usr/share/jpilot/jpilotrc.default 52.94% done, 8.86 files/second, ETA Sat Dec 11 07:58:21 2010, processing regular file /usr/share/jpilot/AddressDB.pdb 58.82% done, 8.89 files/second, ETA Sat Dec 11 07:58:21 2010, processing regular file /usr/share/jpilot/ToDoDB.pdb 64.71% done, 9.23 files/second, ETA Sat Dec 11 07:58:21 2010, processing regular file /usr/share/jpilot/TasksDB-PTod.pdb 70.59% done, 9.53 files/second, ETA Sat Dec 11 07:58:21 2010, processing regular file /usr/share/jpilot/DatebookDB.pdb 76.47% done, 9.80 files/second, ETA Sat Dec 11 07:58:21 2010, processing regular file /usr/share/jpilot/Memo32DB.pdb 82.35% done, 9.99 files/second, ETA Sat Dec 11 07:58:21 2010, processing regular file /usr/share/jpilot/MemosDB-PMem.pdb 88.24% done, 10.21 files/second, ETA Sat Dec 11 07:58:21 2010, processing regular file /usr/share/jpilot/jpilotrc.steel 94.12% done, 10.36 files/second, ETA Sat Dec 11 07:58:21 2010, ! ../../dumpdb $(ls -td save-dir-pypy/files/1* | head -1)/dir-usr/dir-share/dir-jpilot/files | egrep --binary-files=text -- '->' | awk ' { print $2 }' | tr -d '[A-Za-z0-9\._\-]' | sed '/^$/d' | egrep --binary-files=text . ` ñ ` Àñ@à make[2]: *** [go] Error 1
participants (2)
-
Amaury Forgeot d'Arc
-
Dan Stromberg