Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(161187)

#23985: Crash when deleting slices from duplicated bytearray

Can't Edit
Can't Publish+Mail
Start Review
Created:
4 years, 3 months ago by johan.dahlberg
Modified:
4 years, 2 months ago
Reviewers:
pitrou
CC:
terry.reedy, AntoinePitrou, tim.golden, ned.deily, devnull_psf.upfronthosting.co.za, Martin Panter, Zach Ware, storchaka, wolma, alexei.romanov, johan.dahlberg_electrumab.se
Visibility:
Public.

Patch Set 1 #

Total comments: 1

Patch Set 2 #

Patch Set 3 #

Unified diffs Side-by-side diffs Delta from patch set Stats Patch
Lib/test/test_bytes.py View 1 2 1 chunk +16 lines, -0 lines 0 comments Download
Objects/bytearrayobject.c View 1 2 2 chunks +2 lines, -6 lines 0 comments Download

Messages

Total messages: 1
AntoinePitrou
4 years, 2 months ago #1
Thanks for the patch. It would be nice to add a test case (even if very simple).

http://bugs.python.org/review/23985/diff/14646/Objects/bytearrayobject.c
File Objects/bytearrayobject.c (right):

http://bugs.python.org/review/23985/diff/14646/Objects/bytearrayobject.c#newc...
Objects/bytearrayobject.c:333: if (self->ob_start + size < self->ob_bytes +
self->ob_alloc) {
How about simply removing this shortcut? PyByteArray_Resize() should handle it
fine.
Sign in to reply to this message.

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+