On Thu, Jun 19, 2008 at 4:06 PM, Gustavo Niemeyer <[EMAIL PROTECTED]> wrote:
>
>> I checked out your latest need-for-speed-revenge branch, and had two
>> immediate problems:
>> * the test suite segfaulted in Compile__call__()
>> * the extension would not compile with Python 2.4
>>
>> Attached is a bundle that fixes both issues.
>
> Oops.. it wasn't segfaulting for me unfortunately. I guess that proves
> the point about single-exit functions.
>
> I'm sorry about that, and thanks for the fixes.
Attached is a proper fix for Compile__call__(). The root cause of the
segfault was that the function was using default_compile_join before
initialize_globals() had set it to a Python object. Hence the
Py_DECREF() that I removed in my previous patch hit a NULL.
I guess the first Compile__call__() I hit didn't actually use the join
argument, since the segfault went away when I removed the unnecessary
Py_INCREF/Py_DECREF calls.
James.
# Bazaar merge directive format 2 (Bazaar 0.90)
# revision_id: [EMAIL PROTECTED]
# target_branch: bzr+ssh://[EMAIL PROTECTED]/%7Eniemeyer\
# /storm/need-for-speed-revenge/
# testament_sha1: 856cba7731217800fd0fcfa168cc8f78f9c8219a
# timestamp: 2008-06-19 18:05:57 +0800
# base_revision_id: [EMAIL PROTECTED]
# p3968bwck10f13jc
#
# Begin patch
=== modified file 'storm/cextensions.c'
--- storm/cextensions.c 2008-06-19 03:11:36 +0000
+++ storm/cextensions.c 2008-06-19 10:00:29 +0000
@@ -1725,7 +1725,7 @@
PyObject *expr = NULL;
PyObject *state = Py_None;
- PyObject *join = default_compile_join;
+ PyObject *join;
char raw = 0;
char token = 0;
@@ -1735,6 +1735,8 @@
return NULL;
}
+ join = default_compile_join;
+
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|OSbb", kwlist,
&expr, &state, &join, &raw, &token)) {
return NULL;
# Begin bundle
IyBCYXphYXIgcmV2aXNpb24gYnVuZGxlIHY0CiMKQlpoOTFBWSZTWdE9jLMAAgTfgGAQUf///3//
//C////wUASbZ4dJLFlGk2QSUKnqn6p7QyGSanpP9SemlB7STJ6mTyaPUanqMgeEm1PUEU/VT1M0
gZD1GgMgABoAABoAAASiaU8E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ul6Jsj7u/fFLM6IKqDL/ZUGHuZs5X0CHdlQe8IFhM915qVRi+
8N6FO9fj36XS0IJyIEmGfiiH7r/xUT03eIrBi8OQ366BZgOD7kKJTtloAgD182MBF5g9Zxdbvb5I
Eh/wcFRVvYJR6iIatlFILaxvk4xkgfBmUFFP3UNhbLBB/ODGJsBnpOJmYnMF+mhz9dX2+Acd612h
7szCv1MQaGKFHzRGwYqqXLMXZbwaQJ3lFFAVAQHSRA1c0c9asMhAnxDEsqIeCWUESfcLqlRqQ3p0
Ec1YZnqKoqLq8aMNAVEHtWVZoCGVjLOVNqTUolKQ4UB2ThQE6Ho7ou2ZaX/qIPA35mPuxJ7S8RUN
tmCSGOFRGBFEZFVHKD6mFEG20GIxo6sP1Jv85LkCQbK9IY7V15iKJfYvZHZM8JgVFQorf8XckU4U
JDRPYyzA
--
storm mailing list
[email protected]
Modify settings or unsubscribe at:
https://lists.ubuntu.com/mailman/listinfo/storm