Re: [Cython] segfault due to using DECREF instead of XDECREF

2014-01-23 Thread Stefan Behnel
Victor Makarov, 23.01.2014 21:02: > I'd like to fix this if you don't mind. Oh, I certainly don't mind. :) Stefan ___ cython-devel mailing list cython-devel@python.org https://mail.python.org/mailman/listinfo/cython-devel

Re: [Cython] segfault due to using DECREF instead of XDECREF

2014-01-23 Thread Victor Makarov
2014/1/23 Syam Gadde : > On 01/23/2014 01:04 PM, Stefan Behnel wrote: >> >> BTW, thanks for cutting down the code to a short and easy to analyse test >> case, but if the original code really has a control flow like that, there >> might be some space left for improved clarity. > > > Absolutely. In

[Cython] C code churn and benchmark diffs

2014-01-23 Thread Stefan Behnel
Hi, to get a better idea of what new optimisations (or C code changes in general) actually bring, I've added a diffing step to the benchmark runner jobs. The bigger ones now generate an additional output file "cfiles.diff.gz" that contains a diff of the C files generated in the current run against

Re: [Cython] segfault due to using DECREF instead of XDECREF

2014-01-23 Thread Syam Gadde
On 01/23/2014 01:04 PM, Stefan Behnel wrote: BTW, thanks for cutting down the code to a short and easy to analyse test case, but if the original code really has a control flow like that, there might be some space left for improved clarity. Absolutely. In the wild, it manifested itself in PyFF

Re: [Cython] bytearray tests fail with default unsigned char

2014-01-23 Thread Stefan Behnel
Julian Taylor, 22.01.2014 00:03: > the bytearray tests are broken when chars are unsigned. > > tests/run/bytearraymethods.pyx defines following function: > def bytearray_append(b, char c, int i, object o): > > this gets converted to an effective __Pyx_PyInt_AsUnsignedChar which > then errors out

Re: [Cython] segfault due to using DECREF instead of XDECREF

2014-01-23 Thread Stefan Behnel
Syam Gadde, 21.01.2014 23:00: > It seems that cython's static code analysis is failing on the following > code. It thinks that a particular variable (myobject2) must not be > NULL, but in fact it is, so the __Pyx_DECREF_SET segfaults. This came > from third-party code, so I could fix it with an e