GH-89727: Fix os.fwalk() recursion error on deep trees#119638
Conversation
Implement `os.fwalk()` using a list as a stack to avoid emitting recursion errors on deeply nested trees.
|
#119473 fixes the test failure. (edited 30 may: I've worked around this for now.) |
Sorry, something went wrong.
|
Ready for review! I fixed the test failure mentioned above by reversing the |
Sorry, something went wrong.
carljm
left a comment
There was a problem hiding this comment.
I won't claim I did a line-by-line verification of equivalence with the current code, but I walked through the new code and it looks sensible, and the existing test coverage looks reasonable.
Did you consider adding a test that sets a very low recursion limit and verifies we don't hit it? I don't feel strongly about this.
Sorry, something went wrong.
I've enabled |
Sorry, something went wrong.
No, that looks fine. Sorry, somehow I just totally missed that one-line removal when focused on the "added lines" side of the diff! |
Sorry, something went wrong.
|
No worries, thanks tons for the speedy review :) |
Sorry, something went wrong.
|
Thanks @barneygale for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12, 3.13. |
Sorry, something went wrong.
…nGH-119638) Implement `os.fwalk()` using a list as a stack to avoid emitting recursion errors on deeply nested trees. (cherry picked from commit 3c890b5) Co-authored-by: Barney Gale <barney.gale@gmail.com>
…nGH-119638) Implement `os.fwalk()` using a list as a stack to avoid emitting recursion errors on deeply nested trees. (cherry picked from commit 3c890b5) Co-authored-by: Barney Gale <barney.gale@gmail.com>
⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️Hi! The buildbot s390x Fedora LTO + PGO 3.13 has failed when building commit 810a09a. What do you need to do:
You can take a look at the buildbot page here: https://buildbot.python.org/all/#builders/1511/builds/65 Failed tests:
Summary of the results of the build (if available): == Click to see traceback logsremote: Enumerating objects: 26, done.
remote: Counting objects: 3% (1/26)
remote: Counting objects: 7% (2/26)
remote: Counting objects: 11% (3/26)
remote: Counting objects: 15% (4/26)
remote: Counting objects: 19% (5/26)
remote: Counting objects: 23% (6/26)
remote: Counting objects: 26% (7/26)
remote: Counting objects: 30% (8/26)
remote: Counting objects: 34% (9/26)
remote: Counting objects: 38% (10/26)
remote: Counting objects: 42% (11/26)
remote: Counting objects: 46% (12/26)
remote: Counting objects: 50% (13/26)
remote: Counting objects: 53% (14/26)
remote: Counting objects: 57% (15/26)
remote: Counting objects: 61% (16/26)
remote: Counting objects: 65% (17/26)
remote: Counting objects: 69% (18/26)
remote: Counting objects: 73% (19/26)
remote: Counting objects: 76% (20/26)
remote: Counting objects: 80% (21/26)
remote: Counting objects: 84% (22/26)
remote: Counting objects: 88% (23/26)
remote: Counting objects: 92% (24/26)
remote: Counting objects: 96% (25/26)
remote: Counting objects: 100% (26/26)
remote: Counting objects: 100% (26/26), done.
remote: Compressing objects: 25% (1/4)
remote: Compressing objects: 50% (2/4)
remote: Compressing objects: 75% (3/4)
remote: Compressing objects: 100% (4/4)
remote: Compressing objects: 100% (4/4), done.
remote: Total 17 (delta 14), reused 15 (delta 13), pack-reused 0
From https://github.com/python/cpython
* branch 3.13 -> FETCH_HEAD
Note: switching to '810a09ad3710be60cff9e174be85ca65e76cdbd1'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 810a09ad37 [3.13] GH-89727: Fix `os.fwalk()` recursion error on deep trees (GH-119638) (#119764)
Switched to and reset branch '3.13'
configure: WARNING: no system libmpdecimal found; falling back to bundled libmpdecimal (deprecated and scheduled for removal in Python 3.15)
find: ‘build’: No such file or directory
find: ‘build’: No such file or directory
find: ‘build’: No such file or directory
find: ‘build’: No such file or directory
make[2]: [Makefile:3118: clean-retain-profile] Error 1 (ignored)
In function ‘word_to_string’,
inlined from ‘coeff_to_string’ at ./Modules/_decimal/libmpdec/io.c:411:13,
inlined from ‘_mpd_to_string’ at ./Modules/_decimal/libmpdec/io.c:612:18:
./Modules/_decimal/libmpdec/io.c:349:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
349 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
| ~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:349:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
349 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
| ~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:349:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
349 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
| ~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:349:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
349 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
| ~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:349:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
349 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
| ~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:349:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
349 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
| ~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:349:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
349 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
| ~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:349:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
349 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
| ~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:349:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
349 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
| ~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:349:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
349 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
| ~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:349:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
349 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
| ~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:349:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
349 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
| ~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:349:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
349 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
| ~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:349:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
349 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
| ~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:349:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
349 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
| ~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:349:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
349 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
| ~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:349:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
349 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
| ~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:349:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
349 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
| ~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:349:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
349 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
| ~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:349:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
349 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
| ~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:349:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
349 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
| ~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:349:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
349 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
| ~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:349:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
349 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
| ~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:349:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
349 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
| ~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:349:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
349 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
| ~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:349:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
349 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
| ~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:349:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
349 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
| ~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:349:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
349 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
| ~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:349:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
349 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
| ~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:349:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
349 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
| ~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:349:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
./Modules/_decimal/libmpdec/io.c:349:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
349 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
| ~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:349:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
In function ‘word_to_string’,
inlined from ‘coeff_to_string’ at ./Modules/_decimal/libmpdec/io.c:411:13,
inlined from ‘_mpd_to_string’ at ./Modules/_decimal/libmpdec/io.c:608:18:
./Modules/_decimal/libmpdec/io.c:349:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
349 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
| ~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:349:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
349 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
| ~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:349:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
349 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
| ~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:349:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
349 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
| ~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:349:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
349 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
| ~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:349:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
349 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
| ~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:349:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
349 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
| ~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:349:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
349 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
| ~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:349:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
349 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
| ~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:349:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
349 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
| ~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:349:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
349 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
| ~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:349:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
349 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
| ~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:349:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
349 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
| ~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:349:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
349 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
| ~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:349:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
349 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
| ~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:349:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
349 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
| ~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:349:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
349 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
| ~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:349:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
349 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
| ~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:349:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
349 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
| ~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:349:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
349 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
| ~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:349:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
349 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
| ~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:349:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
349 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
| ~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:349:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
349 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
| ~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:349:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
349 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
| ~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:349:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
349 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
| ~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:349:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
349 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
| ~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:349:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
349 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
| ~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:349:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
349 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
| ~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:349:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
349 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
| ~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:349:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
349 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
| ~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:349:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
349 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
| ~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:349:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
349 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
| ~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:349:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
349 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
| ~~~~~^~~~~~~~~~~~~~~~~~~~~
In function ‘utf8_toUtf8’,
inlined from ‘toAscii’ at ./Modules/expat/xmltok.c:1038:3,
inlined from ‘doParseXmlDecl’ at ./Modules/expat/xmltok.c:1192:13:
./Modules/expat/xmltok.c:392:5: warning: ‘memcpy’ writing 2 or more bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
392 | memcpy(*toP, *fromP, bytesToCopy);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./Modules/expat/xmltok.c: In function ‘doParseXmlDecl’:
./Modules/expat/xmltok.c:1036:8: note: destination object ‘buf’ of size 1
1036 | char buf[1];
| ^~~
In function ‘utf8_toUtf8’,
inlined from ‘toAscii’ at ./Modules/expat/xmltok.c:1038:3,
inlined from ‘parsePseudoAttribute’ at ./Modules/expat/xmltok.c:1070:9:
./Modules/expat/xmltok.c:392:5: warning: ‘memcpy’ writing 2 or more bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
392 | memcpy(*toP, *fromP, bytesToCopy);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./Modules/expat/xmltok.c: In function ‘parsePseudoAttribute’:
./Modules/expat/xmltok.c:1036:8: note: destination object ‘buf’ of size 1
1036 | char buf[1];
| ^~~
In function ‘utf8_toUtf8’,
inlined from ‘toAscii’ at ./Modules/expat/xmltok.c:1038:3,
inlined from ‘parsePseudoAttribute’ at ./Modules/expat/xmltok.c:1076:12:
./Modules/expat/xmltok.c:392:5: warning: ‘memcpy’ writing 2 or more bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
392 | memcpy(*toP, *fromP, bytesToCopy);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./Modules/expat/xmltok.c: In function ‘parsePseudoAttribute’:
./Modules/expat/xmltok.c:1036:8: note: destination object ‘buf’ of size 1
1036 | char buf[1];
| ^~~
In function ‘utf8_toUtf8’,
inlined from ‘toAscii’ at ./Modules/expat/xmltok.c:1038:3,
inlined from ‘parsePseudoAttribute’ at ./Modules/expat/xmltok.c:1076:12:
./Modules/expat/xmltok.c:392:5: warning: ‘memcpy’ writing 2 or more bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
392 | memcpy(*toP, *fromP, bytesToCopy);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./Modules/expat/xmltok.c: In function ‘parsePseudoAttribute’:
./Modules/expat/xmltok.c:1036:8: note: destination object ‘buf’ of size 1
1036 | char buf[1];
| ^~~
In function ‘utf8_toUtf8’,
inlined from ‘toAscii’ at ./Modules/expat/xmltok.c:1038:3,
inlined from ‘parsePseudoAttribute’ at ./Modules/expat/xmltok.c:1083:9:
./Modules/expat/xmltok.c:392:5: warning: ‘memcpy’ writing 2 or more bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
392 | memcpy(*toP, *fromP, bytesToCopy);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./Modules/expat/xmltok.c: In function ‘parsePseudoAttribute’:
./Modules/expat/xmltok.c:1036:8: note: destination object ‘buf’ of size 1
1036 | char buf[1];
| ^~~
In function ‘utf8_toUtf8’,
inlined from ‘toAscii’ at ./Modules/expat/xmltok.c:1038:3,
inlined from ‘parsePseudoAttribute’ at ./Modules/expat/xmltok.c:1083:9:
./Modules/expat/xmltok.c:392:5: warning: ‘memcpy’ writing 2 or more bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
392 | memcpy(*toP, *fromP, bytesToCopy);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./Modules/expat/xmltok.c: In function ‘parsePseudoAttribute’:
./Modules/expat/xmltok.c:1036:8: note: destination object ‘buf’ of size 1
1036 | char buf[1];
| ^~~
In function ‘utf8_toUtf8’,
inlined from ‘toAscii’ at ./Modules/expat/xmltok.c:1038:3,
inlined from ‘parsePseudoAttribute’ at ./Modules/expat/xmltok.c:1110:7:
./Modules/expat/xmltok.c:392:5: warning: ‘memcpy’ writing 2 or more bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
392 | memcpy(*toP, *fromP, bytesToCopy);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./Modules/expat/xmltok.c: In function ‘parsePseudoAttribute’:
./Modules/expat/xmltok.c:1036:8: note: destination object ‘buf’ of size 1
1036 | char buf[1];
| ^~~
In function ‘utf8_toUtf8’,
inlined from ‘toAscii’ at ./Modules/expat/xmltok.c:1038:3,
inlined from ‘parsePseudoAttribute’ at ./Modules/expat/xmltok.c:1123:9:
./Modules/expat/xmltok.c:392:5: warning: ‘memcpy’ writing 2 or more bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
392 | memcpy(*toP, *fromP, bytesToCopy);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./Modules/expat/xmltok.c: In function ‘parsePseudoAttribute’:
./Modules/expat/xmltok.c:1036:8: note: destination object ‘buf’ of size 1
1036 | char buf[1];
| ^~~
In function ‘utf8_toUtf8’,
inlined from ‘toAscii’ at ./Modules/expat/xmltok.c:1038:3,
inlined from ‘parsePseudoAttribute’ at ./Modules/expat/xmltok.c:1123:9:
./Modules/expat/xmltok.c:392:5: warning: ‘memcpy’ writing 2 or more bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
392 | memcpy(*toP, *fromP, bytesToCopy);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./Modules/expat/xmltok.c: In function ‘parsePseudoAttribute’:
./Modules/expat/xmltok.c:1036:8: note: destination object ‘buf’ of size 1
1036 | char buf[1];
| ^~~
In function ‘utf8_toUtf8’,
inlined from ‘toAscii’ at ./Modules/expat/xmltok.c:1038:3,
inlined from ‘doParseXmlDecl’ at ./Modules/expat/xmltok.c:1192:13:
./Modules/expat/xmltok.c:392:5: warning: ‘memcpy’ writing 2 or more bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
392 | memcpy(*toP, *fromP, bytesToCopy);
| ^
./Modules/expat/xmltok.c: In function ‘doParseXmlDecl’:
./Modules/expat/xmltok.c:1036:8: note: destination object ‘buf’ of size 1
1036 | char buf[1];
| ^
In function ‘utf8_toUtf8’,
inlined from ‘toAscii’ at ./Modules/expat/xmltok.c:1038:3,
inlined from ‘parsePseudoAttribute’ at ./Modules/expat/xmltok.c:1070:9:
./Modules/expat/xmltok.c:392:5: warning: ‘memcpy’ writing 2 or more bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
392 | memcpy(*toP, *fromP, bytesToCopy);
| ^
./Modules/expat/xmltok.c: In function ‘parsePseudoAttribute’:
./Modules/expat/xmltok.c:1036:8: note: destination object ‘buf’ of size 1
1036 | char buf[1];
| ^
In function ‘utf8_toUtf8’,
inlined from ‘toAscii’ at ./Modules/expat/xmltok.c:1038:3,
inlined from ‘parsePseudoAttribute’ at ./Modules/expat/xmltok.c:1076:12:
./Modules/expat/xmltok.c:392:5: warning: ‘memcpy’ writing 2 or more bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
392 | memcpy(*toP, *fromP, bytesToCopy);
| ^
./Modules/expat/xmltok.c: In function ‘parsePseudoAttribute’:
./Modules/expat/xmltok.c:1036:8: note: destination object ‘buf’ of size 1
1036 | char buf[1];
| ^
In function ‘utf8_toUtf8’,
inlined from ‘toAscii’ at ./Modules/expat/xmltok.c:1038:3,
inlined from ‘parsePseudoAttribute’ at ./Modules/expat/xmltok.c:1076:12:
./Modules/expat/xmltok.c:392:5: warning: ‘memcpy’ writing 2 or more bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
392 | memcpy(*toP, *fromP, bytesToCopy);
| ^
./Modules/expat/xmltok.c: In function ‘parsePseudoAttribute’:
./Modules/expat/xmltok.c:1036:8: note: destination object ‘buf’ of size 1
1036 | char buf[1];
| ^
In function ‘utf8_toUtf8’,
inlined from ‘toAscii’ at ./Modules/expat/xmltok.c:1038:3,
inlined from ‘parsePseudoAttribute’ at ./Modules/expat/xmltok.c:1083:9:
./Modules/expat/xmltok.c:392:5: warning: ‘memcpy’ writing 2 or more bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
392 | memcpy(*toP, *fromP, bytesToCopy);
| ^
./Modules/expat/xmltok.c: In function ‘parsePseudoAttribute’:
./Modules/expat/xmltok.c:1036:8: note: destination object ‘buf’ of size 1
1036 | char buf[1];
| ^
In function ‘utf8_toUtf8’,
inlined from ‘toAscii’ at ./Modules/expat/xmltok.c:1038:3,
inlined from ‘parsePseudoAttribute’ at ./Modules/expat/xmltok.c:1083:9:
./Modules/expat/xmltok.c:392:5: warning: ‘memcpy’ writing 2 or more bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
392 | memcpy(*toP, *fromP, bytesToCopy);
| ^
./Modules/expat/xmltok.c: In function ‘parsePseudoAttribute’:
./Modules/expat/xmltok.c:1036:8: note: destination object ‘buf’ of size 1
1036 | char buf[1];
| ^
In function ‘utf8_toUtf8’,
inlined from ‘toAscii’ at ./Modules/expat/xmltok.c:1038:3,
inlined from ‘parsePseudoAttribute’ at ./Modules/expat/xmltok.c:1110:7:
./Modules/expat/xmltok.c:392:5: warning: ‘memcpy’ writing 2 or more bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
392 | memcpy(*toP, *fromP, bytesToCopy);
| ^
./Modules/expat/xmltok.c: In function ‘parsePseudoAttribute’:
./Modules/expat/xmltok.c:1036:8: note: destination object ‘buf’ of size 1
1036 | char buf[1];
| ^
In function ‘utf8_toUtf8’,
inlined from ‘toAscii’ at ./Modules/expat/xmltok.c:1038:3,
inlined from ‘parsePseudoAttribute’ at ./Modules/expat/xmltok.c:1123:9:
./Modules/expat/xmltok.c:392:5: warning: ‘memcpy’ writing 2 or more bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
392 | memcpy(*toP, *fromP, bytesToCopy);
| ^
./Modules/expat/xmltok.c: In function ‘parsePseudoAttribute’:
./Modules/expat/xmltok.c:1036:8: note: destination object ‘buf’ of size 1
1036 | char buf[1];
| ^
In function ‘utf8_toUtf8’,
inlined from ‘toAscii’ at ./Modules/expat/xmltok.c:1038:3,
inlined from ‘parsePseudoAttribute’ at ./Modules/expat/xmltok.c:1123:9:
./Modules/expat/xmltok.c:392:5: warning: ‘memcpy’ writing 2 or more bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
392 | memcpy(*toP, *fromP, bytesToCopy);
| ^
./Modules/expat/xmltok.c: In function ‘parsePseudoAttribute’:
./Modules/expat/xmltok.c:1036:8: note: destination object ‘buf’ of size 1
1036 | char buf[1];
| ^
In function ‘word_to_string’,
inlined from ‘coeff_to_string’ at ./Modules/_decimal/libmpdec/io.c:411:13:
./Modules/_decimal/libmpdec/io.c:360:14: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
360 | case 15: EXTRACT_DIGIT(s, x, 100000000000000ULL, dot);
| ^
./Modules/_decimal/libmpdec/io.c:359:14: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
359 | case 16: EXTRACT_DIGIT(s, x, 1000000000000000ULL, dot);
| ^
./Modules/_decimal/libmpdec/io.c:360:14: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
360 | case 15: EXTRACT_DIGIT(s, x, 100000000000000ULL, dot);
| ^
./Modules/_decimal/libmpdec/io.c:361:14: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
361 | case 14: EXTRACT_DIGIT(s, x, 10000000000000ULL, dot);
| ^
./Modules/_decimal/libmpdec/io.c:358:14: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
358 | case 17: EXTRACT_DIGIT(s, x, 10000000000000000ULL, dot);
| ^
./Modules/_decimal/libmpdec/io.c:357:14: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
357 | case 18: EXTRACT_DIGIT(s, x, 100000000000000000ULL, dot);
| ^
./Modules/_decimal/libmpdec/io.c:358:14: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
358 | case 17: EXTRACT_DIGIT(s, x, 10000000000000000ULL, dot);
| ^
./Modules/_decimal/libmpdec/io.c:359:14: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
359 | case 16: EXTRACT_DIGIT(s, x, 1000000000000000ULL, dot);
| ^
./Modules/_decimal/libmpdec/io.c:362:14: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
362 | case 13: EXTRACT_DIGIT(s, x, 1000000000000ULL, dot);
| ^
./Modules/_decimal/libmpdec/io.c:361:14: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
361 | case 14: EXTRACT_DIGIT(s, x, 10000000000000ULL, dot);
| ^
./Modules/_decimal/libmpdec/io.c:362:14: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
362 | case 13: EXTRACT_DIGIT(s, x, 1000000000000ULL, dot);
| ^
./Modules/_decimal/libmpdec/io.c:363:14: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
363 | case 12: EXTRACT_DIGIT(s, x, 100000000000ULL, dot);
| ^
./Modules/_decimal/libmpdec/io.c:364:14: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
364 | case 11: EXTRACT_DIGIT(s, x, 10000000000ULL, dot);
| ^
./Modules/_decimal/libmpdec/io.c:363:14: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
363 | case 12: EXTRACT_DIGIT(s, x, 100000000000ULL, dot);
| ^
./Modules/_decimal/libmpdec/io.c:364:14: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
364 | case 11: EXTRACT_DIGIT(s, x, 10000000000ULL, dot);
| ^
./Modules/_decimal/libmpdec/io.c:366:14: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
366 | case 10: EXTRACT_DIGIT(s, x, 1000000000UL, dot);
| ^
./Modules/_decimal/libmpdec/io.c:367:14: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
367 | case 9: EXTRACT_DIGIT(s, x, 100000000UL, dot);
| ^
./Modules/_decimal/libmpdec/io.c:366:14: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
366 | case 10: EXTRACT_DIGIT(s, x, 1000000000UL, dot);
| ^
./Modules/_decimal/libmpdec/io.c:367:14: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
367 | case 9: EXTRACT_DIGIT(s, x, 100000000UL, dot);
| ^
./Modules/_decimal/libmpdec/io.c:368:14: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
368 | case 8: EXTRACT_DIGIT(s, x, 10000000UL, dot);
| ^
./Modules/_decimal/libmpdec/io.c:369:14: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
369 | case 7: EXTRACT_DIGIT(s, x, 1000000UL, dot);
| ^
./Modules/_decimal/libmpdec/io.c:368:14: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
368 | case 8: EXTRACT_DIGIT(s, x, 10000000UL, dot);
| ^
./Modules/_decimal/libmpdec/io.c:369:14: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
369 | case 7: EXTRACT_DIGIT(s, x, 1000000UL, dot);
| ^
./Modules/_decimal/libmpdec/io.c:370:14: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
370 | case 6: EXTRACT_DIGIT(s, x, 100000UL, dot);
| ^
./Modules/_decimal/libmpdec/io.c:371:14: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
371 | case 5: EXTRACT_DIGIT(s, x, 10000UL, dot);
| ^
./Modules/_decimal/libmpdec/io.c:370:14: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
370 | case 6: EXTRACT_DIGIT(s, x, 100000UL, dot);
| ^
./Modules/_decimal/libmpdec/io.c:371:14: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
371 | case 5: EXTRACT_DIGIT(s, x, 10000UL, dot);
| ^
./Modules/_decimal/libmpdec/io.c:372:14: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
372 | case 4: EXTRACT_DIGIT(s, x, 1000UL, dot);
| ^
./Modules/_decimal/libmpdec/io.c:373:14: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
373 | case 3: EXTRACT_DIGIT(s, x, 100UL, dot);
| ^
./Modules/_decimal/libmpdec/io.c:372:14: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
372 | case 4: EXTRACT_DIGIT(s, x, 1000UL, dot);
| ^
./Modules/_decimal/libmpdec/io.c:373:14: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
373 | case 3: EXTRACT_DIGIT(s, x, 100UL, dot);
| ^
./Modules/_decimal/libmpdec/io.c:374:14: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
374 | case 2: EXTRACT_DIGIT(s, x, 10UL, dot);
| ^
./Modules/_decimal/libmpdec/io.c:374:14: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
make: *** [Makefile:2244: buildbottest] Error 2 |
Sorry, something went wrong.
…n#119638) Implement `os.fwalk()` using a list as a stack to avoid emitting recursion errors on deeply nested trees.
…n#119638) Implement `os.fwalk()` using a list as a stack to avoid emitting recursion errors on deeply nested trees.
Implement
os.fwalk()using a list as a stack to avoid emitting recursion errors on deeply nested trees.