No subject


Wed Jul 1 18:26:42 PDT 2009


same size as the compiler's size_t type, but is signed. It will be a
typedef for ssize_t where available."  Because there's an assertion in
the wrapper code that the size is non-negative, a cast to size_t will
never alter the semantic value, *when* that definition is used.

However, the second hit [3] discusses the proper way to write
extension modules that are backwards compatible with CPython 2.5, and
I though I didn't follow it thoroughly, I have the impression that on
pre-2.5, there could be problems here and elsewhere.  Does Tahoe-LAFS
intend to support pre-2.5 CPython?

[1] http://www.google.com/search?q=3Dpy_ssize_t
[2] http://www.python.org/dev/peps/pep-0353/
[3] http://bugs.python.org/issue1485576



On Tue, Sep 8, 2009 at 11:39 PM, pycryptopp <trac at allmydata.org> wrote:
> #19: Segmentation fault in HashMultipleBlocks
> ---------------------+---------------------------------------------------=
---
> Reporter: =A0francois =A0| =A0 =A0 =A0 =A0 =A0 Owner: =A0francois
> =A0 =A0Type: =A0defect =A0 =A0| =A0 =A0 =A0 =A0 =A0Status: =A0new
> Priority: =A0major =A0 =A0 | =A0 =A0 =A0 =A0 Version: =A00.5.1
> Keywords: =A0 =A0 =A0 =A0 =A0 =A0| =A0 Launchpad_bug:
> ---------------------+---------------------------------------------------=
---
>
> Comment(by warner):
>
> =A0Nice catch! I just pushed [669] with your fix: set PY_SSIZE_T_CLEAN
> =A0everywhere, and update the two remaining uses of "int"-sized {{{t#}}}
> =A0length variables to be Py_ssize_t instead. The segfaults go away, and
> =A0tests pass on linux/32bit, OS-X/10.6/64bit, OS-X/10.5/probably-64-bit.
>
> =A0I didn't touch that implicit cast. If your analysis points out a probl=
em,
> =A0give a yell.
>
> =A0francois: could you play with this patch and see if it makes your segf=
ault
> =A0go away? I know that it happens infrequently enough that it'll be hard=
 to
> =A0develop confidence by merely running the test suite a few times, but m=
aybe
> =A0if you observed no crash for three times as long as the usual time it
> =A0takes to crash, we could treat this one as done..
>
> --
> Ticket URL: <http://allmydata.org/trac/pycryptopp/ticket/19#comment:6>
> pycryptopp <http://allmydata.org/trac/pycryptopp>
> Python bindings for the Crypto++ library
> _______________________________________________
> tahoe-dev mailing list
> tahoe-dev at allmydata.org
> http://allmydata.org/cgi-bin/mailman/listinfo/tahoe-dev
>


More information about the tahoe-dev mailing list