Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
a61b053e
Commit
a61b053e
authored
Sep 24, 2011
by
Mark Dickinson
Browse files
Options
Browse Files
Download
Plain Diff
Merge #12973 itertools fix.
parents
3454d524
b2f6bc72
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
4 deletions
+6
-4
Misc/NEWS
Misc/NEWS
+3
-3
Modules/itertoolsmodule.c
Modules/itertoolsmodule.c
+3
-1
No files found.
Misc/NEWS
View file @
a61b053e
...
...
@@ -17,9 +17,9 @@ Core and Builtins
-
Issue
#
13021
:
Missing
decref
on
an
error
path
.
Thanks
to
Suman
Saha
for
finding
the
bug
and
providing
a
patch
.
-
Issue
#
12973
:
Fix
overflow
check
that
relied
on
undefined
behaviour
in
list_repeat
.
This
bug
caused
test_list
to
fail
with
recent
version
s
of
Clang
.
-
Issue
#
12973
:
Fix
overflow
check
s
that
relied
on
undefined
behaviour
in
list_repeat
(
listobject
.
c
)
and
islice_next
(
itertoolsmodule
.
c
).
These
bug
s
caused
test
failures
with
recent
versions
of
Clang
.
-
Issue
#
12904
:
os
.
utime
,
os
.
futimes
,
os
.
lutimes
,
and
os
.
futimesat
now
write
atime
and
mtime
with
nanosecond
precision
on
modern
POSIX
platforms
.
...
...
Modules/itertoolsmodule.c
View file @
a61b053e
...
...
@@ -1234,7 +1234,9 @@ islice_next(isliceobject *lz)
return
NULL
;
lz
->
cnt
++
;
oldnext
=
lz
->
next
;
lz
->
next
+=
lz
->
step
;
/* The (size_t) cast below avoids the danger of undefined
behaviour from signed integer overflow. */
lz
->
next
+=
(
size_t
)
lz
->
step
;
if
(
lz
->
next
<
oldnext
||
(
stop
!=
-
1
&&
lz
->
next
>
stop
))
lz
->
next
=
stop
;
return
item
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment