On 31 August 2016 at 05:06, Serhiy Storchaka wrote:
> On 30.08.16 20:42, Nick Coghlan wrote:
>> Given Serhiy's clarification that this is primarily a thread safety
>> problem, I'm more supportive of the "PySlice_GetIndicesForObject"
>> approach (since that can call all the
On 30.08.16 20:42, Nick Coghlan wrote:
On 28 August 2016 at 08:25, Terry Reedy wrote:
Slicing can be made to malfunction and even crash with an 'evil' __index__
method. https://bugs.python.org/issue27867
The crux of the problem is this: PySlice_GetIndicesEx
receives a slice
On 28 August 2016 at 08:25, Terry Reedy wrote:
> Slicing can be made to malfunction and even crash with an 'evil' __index__
> method. https://bugs.python.org/issue27867
>
> The crux of the problem is this: PySlice_GetIndicesEx
> receives a slice object and a sequence length.
On 30.08.16 15:31, Dima Tisnek wrote:
On 30 August 2016 at 14:13, Serhiy Storchaka wrote:
1. Detect length change and raise.
It would be simpler solution. But I afraid that this can break third-party
code that "just works" now. For example slicing a list "just works" if
On Tue, Aug 30, 2016 at 03:11:25PM +0200, Maciej Fijalkowski wrote:
> It's more complicated - if the third party rely on the code working
> when one thread slices while the other thread modifies that gives
> implicit atomicity requirements. Those specific requirements are very
> hard to maintain
On Tue, Aug 30, 2016 at 2:31 PM, Dima Tisnek wrote:
> On 30 August 2016 at 14:13, Serhiy Storchaka wrote:
>>> 1. Detect length change and raise.
>>
>>
>> It would be simpler solution. But I afraid that this can break third-party
>> code that "just works"
On 30 August 2016 at 14:13, Serhiy Storchaka wrote:
>> 1. Detect length change and raise.
>
>
> It would be simpler solution. But I afraid that this can break third-party
> code that "just works" now. For example slicing a list "just works" if step
> is 1. It can return not
On 28.08.16 01:25, Terry Reedy wrote:
0. Do nothing.
The problem is not in pathological __index__. The problem is in
executing Python code and releasing GIL. In multithread production code
one thread can read a slice when other thread modifies a collection. In
very very rare case it causes
On 08/28/2016 09:26 AM, Nick Coghlan wrote:
On 28 August 2016 at 08:25, Terry Reedy wrote:
Slicing can be made to malfunction and even crash with an 'evil' __index__
method. https://bugs.python.org/issue27867
The crux of the problem is this: PySlice_GetIndicesEx
receives a
On 28 August 2016 at 08:25, Terry Reedy wrote:
> Slicing can be made to malfunction and even crash with an 'evil' __index__
> method. https://bugs.python.org/issue27867
>
> The crux of the problem is this: PySlice_GetIndicesEx
> receives a slice object and a sequence length.
Slicing can be made to malfunction and even crash with an 'evil'
__index__ method. https://bugs.python.org/issue27867
The crux of the problem is this: PySlice_GetIndicesEx
receives a slice object and a sequence length. Calling __index__ on the
start, stop, and step components can mutate the
11 matches
Mail list logo