[tahoe-dev] pycryptopp and snow leopard

Brian Warner warner at lothar.com
Wed Sep 9 06:48:33 UTC 2009


Aaron Cordova wrote:

> It seems part of pycryptopp is failing (segfaulting) when running
> Tahoe on SnowLeopard (Mac OS 10.6). This is after a new install of
> Tahoe 1.5.0.

Thanks to Aaron's bug report and Nathan's analysis, I think the patch I
just pushed to pycryptopp trunk should fix this one. There were several
places that called PyArg_ParseTupleAndKeywords expecting a Py_ssize_t
value, but which didn't set the magic PY_SSIZE_T_CLEAN flag, so they
were given ints instead. On a 64-bit system, if the stack was
initialized just wrong, this would result in corrupted size values,
causing segfaults.

The patch sets PY_SSIZE_T_CLEAN and fixes up the few remaining places
that used "int" instead of "Py_ssize_t". The tests now pass on my Snow
Leopard / python2.6 system (as well as my linux box).

By building a pycryptopp egg ("python2.6 setup.py bdist_egg") and
copying it into my tahoe tree (both the root and into
support/lib/python2.6/site-packages), I was able to get the Tahoe unit
tests to pass too.

thanks everybody!
 -Brian



More information about the tahoe-dev mailing list