[issue34973] Crash in bytes constructor with mutating list

2018-10-21 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue34973] Crash in bytes constructor with mutating list

2018-10-21 Thread miss-islington
miss-islington added the comment: New changeset 8bb037167cf3204a7d620ba11fbf43d2a9ec36e6 by Miss Islington (bot) in branch '3.6': bpo-34973: Fix crash in bytes constructor. (GH-9841) https://github.com/python/cpython/commit/8bb037167cf3204a7d620ba11fbf43d2a9ec36e6 -- __

[issue34973] Crash in bytes constructor with mutating list

2018-10-21 Thread miss-islington
miss-islington added the comment: New changeset 7f34d550231e047c88a1817b58bda03a33817490 by Miss Islington (bot) in branch '3.7': bpo-34973: Fix crash in bytes constructor. (GH-9841) https://github.com/python/cpython/commit/7f34d550231e047c88a1817b58bda03a33817490 -- nosy: +miss-isl

[issue34973] Crash in bytes constructor with mutating list

2018-10-21 Thread miss-islington
Change by miss-islington : -- pull_requests: +9366 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue34973] Crash in bytes constructor with mutating list

2018-10-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 914f9a078f997e58cfcfabcbb30fafdd1f277bef by Serhiy Storchaka in branch 'master': bpo-34973: Fix crash in bytes constructor. (GH-9841) https://github.com/python/cpython/commit/914f9a078f997e58cfcfabcbb30fafdd1f277bef -- _

[issue34973] Crash in bytes constructor with mutating list

2018-10-21 Thread miss-islington
Change by miss-islington : -- pull_requests: +9365 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue34973] Crash in bytes constructor with mutating list

2018-10-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you Xiang and Alexandre. I'll merge PR 9841. -- ___ Python tracker ___ ___ Python-bugs-li

[issue34973] Crash in bytes constructor with mutating list

2018-10-18 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: PR 9841 looks good to me. I wouldn't worry about the performance hit. -- ___ Python tracker ___ ___

[issue34973] Crash in bytes constructor with mutating list

2018-10-17 Thread Xiang Zhang
Xiang Zhang added the comment: I carefully read both the two PRs. The first one, easy to understand. The second one, I spend some time to figure out why the test doesn't crash, why we need to have reference count checks in two places and make some experiments to test in different cases, how

[issue34973] Crash in bytes constructor with mutating list

2018-10-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I have two options for solving this result. 1. Add necessary checks for the list case. This will add a bunch of code and will slow down handling all lists because of additional checks. 2. Use the optimization for lists only when there are no other referenc

[issue34973] Crash in bytes constructor with mutating list

2018-10-13 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +9216 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://

[issue34973] Crash in bytes constructor with mutating list

2018-10-13 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +9215 stage: -> patch review ___ Python tracker ___ ___ Python-bugs

[issue34973] Crash in bytes constructor with mutating list

2018-10-13 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : Constructing bytes from mutating list can cause a crash. class X: def __index__(self): if len(a) < 1000: a.append(self) return 0 a = [X()] bytes(a) This is not an issue about weird integer-like objects. It is about . The s