Skip to content

gh-109593: Fix reentrancy issue in multiprocessing resource_tracker - #109629

Merged
pitrou merged 3 commits into
python:mainfrom
pitrou:gh109593-ensure-running-reentrant
Sep 26, 2023
Merged

gh-109593: Fix reentrancy issue in multiprocessing resource_tracker#109629
pitrou merged 3 commits into
python:mainfrom
pitrou:gh109593-ensure-running-reentrant

Conversation

@pitrou

@pitroupitrou commented Sep 20, 2023

Copy link
Copy Markdown
Member

@pitrou

pitrou commented Sep 20, 2023

Copy link
Copy Markdown
MemberAuthor

@vstinner This solution should be robust while avoiding the performance issue of calling gc.collect (but let's wait for CI :-)).

@pitroupitrou added 🔨 test-with-buildbots Test PR w/ buildbots; report in status section 🔨 test-with-refleak-buildbots Test PR w/ refleak buildbots; report in status section labels Sep 20, 2023
@bedevere-bot

Copy link
Copy Markdown

🤖 New build scheduled with the buildbot fleet by @pitrou for commit 7c01743 🤖

If you want to schedule another build, you need to add the 🔨 test-with-refleak-buildbots label again.

@bedevere-bot

Copy link
Copy Markdown

🤖 New build scheduled with the buildbot fleet by @pitrou for commit 7c01743 🤖

If you want to schedule another build, you need to add the 🔨 test-with-buildbots label again.

@bedevere-botbedevere-bot removed 🔨 test-with-refleak-buildbots Test PR w/ refleak buildbots; report in status section 🔨 test-with-buildbots Test PR w/ buildbots; report in status section labels Sep 20, 2023

@vstinnervstinner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please open a new issue and write a separated PR to add the _recursion_count()?

Comment threadLib/multiprocessing/resource_tracker.py Outdated
@pitrou

Copy link
Copy Markdown
MemberAuthor

Can you please open a new issue and write a separated PR to add the _recursion_count()?

Should we? I don't want to enter a discussion of whether this private API is generally useful. It is purely meant to allow solving this issue.

@vstinnervstinner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I'm fine with the overall approach. But please add a comment in _stop() and ensure_running() to explain if self._lock._recursion_count() > 1: return with a reference to gh-109593.

@pitrou
pitrouforce-pushed the gh109593-ensure-running-reentrant branch from 7c01743 to 8471da5CompareSeptember 22, 2023 20:14
@pitrou
pitrou marked this pull request as ready for review September 22, 2023 20:14
warnings.warn(
f"ResourceTracker called reentrantly for resource cleanup, "
f"which is unsupported. "
f"The {rtype} object {name!r} might leak.")

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vstinner This might raise a warning from time to time during the test suite, will it fail the buildbots?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hum. If you run tests with -Werror, it will raises an UserWarning exception, and can make the tests fail, no?

@pitrou

Copy link
Copy Markdown
MemberAuthor

@vstinner I did some minor changes (mostly, I added a warning). Do you want to take another look?

@brettcannon
brettcannon removed their request for review September 22, 2023 20:43
@pitrou
pitrou removed the request for review from ncoghlanSeptember 22, 2023 21:29
@vstinner

vstinner commented Sep 25, 2023

Copy link
Copy Markdown
Member

Wow, it really looks like the Windows (x64) CI job wants to fail on unrelated issues.

The default timeout test of test_threading is failing for many years: issue gh-109401.

I launched a new job.

@pitrou

Copy link
Copy Markdown
MemberAuthor

@vstinner So are you ok with this PR after all?

I can't think of another backportable solution. A cleaner solution may be found for the development version, but it will be too risky to backport.

with self._lock:
if self._lock._recursion_count() > 1:
# The code below is certainly not reentrant-safe, so bail out
return self._reentrant_call_error()

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer:

Suggested change
returnself._reentrant_call_error()
raiseself._reentrant_call_error()

or:

Suggested change
returnself._reentrant_call_error()
self._reentrant_call_error()

Since the return here is a lie: the function never returns.

@vstinner

Copy link
Copy Markdown
Member

@vstinner So are you ok with this PR after all?

I'm not ok. Not only, the reproducer script fails when run with python -W error script.py, but you also described that _send() can attempt to write to a closed pipe, or a pipe connected to a process which may be terminated (since it's "dead").

I would prefer to have a queue of pending messages, and send them once we are back to a known state: running and working resource tracker with a pipe connected to this process.

I started a draft patch, but my head is blocked by the concept of reentrant call. I'm now used to multithreading where adding locks make the code correct by making sure that the code is executed in a specific order. But here a threading.Lock blocks on reentrant call, so it should not be used.

Your RLock change sounds more correct than my local change.

@vstinner

Copy link
Copy Markdown
Member

For me, this PR changes too many things are once, I don't feel able to review it. As I wrote, I would prefer to have the RLock change done in a separated PR. So this change would smaller and it would be easier for me to think about it (and consider other implementations).

@pitrou

pitrou commented Sep 26, 2023

Copy link
Copy Markdown
MemberAuthor

Not only, the reproducer script fails when run with python -W error script.py, but you also described that _send() can attempt to write to a closed pipe, or a pipe connected to a process which may be terminated (since it's "dead").

The warning seems useful. Complaining that it fails when -Werror is passed is weird. You added a ton of ResourceWarnings over the years and failing on -Werror wasn't a problem for you then.

Would you prefer the problem to be silenced?

I would prefer to have a queue of pending messages, and send them once we are back to a known state: running and working resource tracker with a pipe connected to this process.

Sure, everyone would like something more reliable. Where is the patch?

For me, this PR changes too many things are once, I don't feel able to review it. As I wrote, I would prefer to have the RLock change done in a separated PR.

The RLock change is trivial, so I'm not sure this would solve anything. But, mostly, the RLock change is only useful for this PR.

That said, I can submit a separate PR for RLock if you're really keen on it.

@pitrou

Copy link
Copy Markdown
MemberAuthor

cc @gpshead

@pitrou

Copy link
Copy Markdown
MemberAuthor

Okay, I think I'm gonna merge this now and submit the backports.

@pitrou
pitrou merged commit 0eb9883 into python:mainSep 26, 2023
@pitroupitrou added needs backport to 3.11 only security fixes needs backport to 3.12 only security fixes labels Sep 26, 2023
@miss-islington

Copy link
Copy Markdown
Contributor

Thanks @pitrou for the PR 🌮🎉.. I'm working now to backport this PR to: 3.11.
🐍🍒⛏🤖

@miss-islington

Copy link
Copy Markdown
Contributor

Thanks @pitrou for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Sep 26, 2023
…cker (pythonGH-109629)
---------
(cherry picked from commit 0eb9883)
Co-authored-by: Antoine Pitrou <antoine@python.org>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Sep 26, 2023
…cker (pythonGH-109629)
---------
(cherry picked from commit 0eb9883)
Co-authored-by: Antoine Pitrou <antoine@python.org>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
@bedevere-app

Copy link
Copy Markdown

GH-109897 is a backport of this pull request to the 3.11 branch.

@bedevere-appbedevere-appBot removed the needs backport to 3.11 only security fixes label Sep 26, 2023
@bedevere-app

Copy link
Copy Markdown

GH-109898 is a backport of this pull request to the 3.12 branch.

@bedevere-appbedevere-appBot removed the needs backport to 3.12 only security fixes label Sep 26, 2023
@bedevere-bot

Copy link
Copy Markdown

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot s390x SLES 3.x has failed when building commit 0eb9883.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/all/#builders/540/builds/6637) and take a look at the build logs.
  4. Check if the failure is related to this commit (0eb9883) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/all/#builders/540/builds/6637

Failed tests:

  • test_tools

Failed subtests:

  • test_freeze_simple_script - test.test_tools.test_freeze.TestFreeze.test_freeze_simple_script

Summary of the results of the build (if available):

==

Click to see traceback logs
Traceback (most recent call last):
File "/home/dje/cpython-buildarea/3.x.edelsohn-sles-z/build/Lib/test/test_tools/test_freeze.py", line 32, in test_freeze_simple_script
outdir, scriptfile, python = helper.prepare(script, outdir)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/dje/cpython-buildarea/3.x.edelsohn-sles-z/build/Tools/freeze/test/freeze.py", line 146, in prepare
copy_source_tree(srcdir, SRCDIR)
File "/home/dje/cpython-buildarea/3.x.edelsohn-sles-z/build/Tools/freeze/test/freeze.py", line 95, in copy_source_tree
shutil.copytree(oldroot, newroot, ignore=ignore_non_src)
File "/home/dje/cpython-buildarea/3.x.edelsohn-sles-z/build/Lib/shutil.py", line 588, in copytreereturn _copytree(entries=entries, src=src, dst=dst, symlinks=symlinks,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/dje/cpython-buildarea/3.x.edelsohn-sles-z/build/Lib/shutil.py", line 542, in _copytreeraise Error(errors)
shutil.Error: [('/home/dje/cpython-buildarea/3.x.edelsohn-sles-z/build/build/test_python_48536æ/tmpqk_ak9w2', '/tmp/test_python_52f1vxr4/tmpbtmc79x8/cpython/build/test_python_48536æ/tmpqk_ak9w2', "[Errno 2] No such file or directory: '/home/dje/cpython-buildarea/3.x.edelsohn-sles-z/build/build/test_python_48536æ/tmpqk_ak9w2'")]

pitrou added a commit that referenced this pull request Sep 26, 2023
…acker (GH-109629) (#109897)
gh-109593: Fix reentrancy issue in multiprocessing resource_tracker (GH-109629)
---------
(cherry picked from commit 0eb9883)
Co-authored-by: Antoine Pitrou <antoine@python.org>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
@bedevere-bot

Copy link
Copy Markdown

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot aarch64 Fedora Stable LTO 3.x has failed when building commit 0eb9883.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/all/#builders/336/builds/4047) and take a look at the build logs.
  4. Check if the failure is related to this commit (0eb9883) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/all/#builders/336/builds/4047

Summary of the results of the build (if available):

==

Click to see traceback logs
Traceback (most recent call last):
File "<frozen importlib._bootstrap>", line 1354, in _find_and_load
File "<frozen importlib._bootstrap>", line 1325, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 929, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 1004, in exec_module
File "<frozen importlib._bootstrap_external>", line 1100, in get_code
File "<frozen importlib._bootstrap_external>", line 1199, in get_dataTypeError: descriptor 'close' for '_io.BufferedReader' objects doesn't apply to a '_io.FileIO' object
Traceback (most recent call last):
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-aarch64.lto/build/Lib/threading.py", line 1066, in _bootstrap_innerself.run()
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-aarch64.lto/build/Lib/threading.py", line 1003, in runself._target(*self._args, **self._kwargs)
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-aarch64.lto/build/Lib/test/test_interpreters.py", line 483, in task
interp = interpreters.create()
^^^^^^^^^^^^^^^^^^^^^
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-aarch64.lto/build/Lib/test/support/interpreters.py", line 25, in createid= _interpreters.create(isolated=isolated)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^RuntimeError: interpreter creation failed
k

@bedevere-bot

Copy link
Copy Markdown

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot s390x RHEL7 LTO 3.x has failed when building commit 0eb9883.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/all/#builders/402/builds/5472) and take a look at the build logs.
  4. Check if the failure is related to this commit (0eb9883) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/all/#builders/402/builds/5472

Failed tests:

  • test_tools

Failed subtests:

  • test_freeze_simple_script - test.test_tools.test_freeze.TestFreeze.test_freeze_simple_script

Summary of the results of the build (if available):

==

Click to see traceback logs
Traceback (most recent call last):
File "/home/dje/cpython-buildarea/3.x.edelsohn-rhel-z.lto/build/Lib/test/test_tools/test_freeze.py", line 32, in test_freeze_simple_script
outdir, scriptfile, python = helper.prepare(script, outdir)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/dje/cpython-buildarea/3.x.edelsohn-rhel-z.lto/build/Tools/freeze/test/freeze.py", line 146, in prepare
copy_source_tree(srcdir, SRCDIR)
File "/home/dje/cpython-buildarea/3.x.edelsohn-rhel-z.lto/build/Tools/freeze/test/freeze.py", line 95, in copy_source_tree
shutil.copytree(oldroot, newroot, ignore=ignore_non_src)
File "/home/dje/cpython-buildarea/3.x.edelsohn-rhel-z.lto/build/Lib/shutil.py", line 588, in copytreereturn _copytree(entries=entries, src=src, dst=dst, symlinks=symlinks,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/dje/cpython-buildarea/3.x.edelsohn-rhel-z.lto/build/Lib/shutil.py", line 542, in _copytreeraise Error(errors)
shutil.Error: [('/home/dje/cpython-buildarea/3.x.edelsohn-rhel-z.lto/build/build/test_python_46121æ', '/tmp/test_python_zo0y7nb6/tmpzbf2mhw5/cpython/build/test_python_46121æ', "[Errno 2] No such file or directory: '/home/dje/cpython-buildarea/3.x.edelsohn-rhel-z.lto/build/build/test_python_46121æ'")]

@vstinner

Copy link
Copy Markdown
Member

The warning seems useful. Complaining that it fails when -Werror is passed is weird. You added a ton of ResourceWarnings over the years and failing on -Werror wasn't a problem for you then.

ResourceWarnings is a call for action: you should close a resource explicitly. But here, as an user, what can you do about this messy reentrant function call issue?

Well, I suppose that a log / error is better than to hang.

This change may or may not fix issue gh-109593: the test may continue to fail, but in different ways.

@bedevere-bot

Copy link
Copy Markdown

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot s390x Fedora LTO + PGO 3.x has failed when building commit 0eb9883.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/all/#builders/545/builds/4537) and take a look at the build logs.
  4. Check if the failure is related to this commit (0eb9883) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/all/#builders/545/builds/4537

Failed tests:

  • test.test_multiprocessing_forkserver.test_processes

Summary of the results of the build (if available):

==

Click to see traceback logs
remote: Enumerating objects: 18, done. remote: Counting objects: 6% (1/15) remote: Counting objects: 13% (2/15) remote: Counting objects: 20% (3/15) remote: Counting objects: 26% (4/15) remote: Counting objects: 33% (5/15) remote: Counting objects: 40% (6/15) remote: Counting objects: 46% (7/15) remote: Counting objects: 53% (8/15) remote: Counting objects: 60% (9/15) remote: Counting objects: 66% (10/15) remote: Counting objects: 73% (11/15) remote: Counting objects: 80% (12/15) remote: Counting objects: 86% (13/15) remote: Counting objects: 93% (14/15) remote: Counting objects: 100% (15/15) remote: Counting objects: 100% (15/15), done. remote: Compressing objects: 7% (1/14) remote: Compressing objects: 14% (2/14) remote: Compressing objects: 21% (3/14) remote: Compressing objects: 28% (4/14) remote: Compressing objects: 35% (5/14) remote: Compressing objects: 42% (6/14) remote: Compressing objects: 50% (7/14) remote: Compressing objects: 57% (8/14) remote: Compressing objects: 64% (9/14) remote: Compressing objects: 71% (10/14) remote: Compressing objects: 78% (11/14) remote: Compressing objects: 85% (12/14) remote: Compressing objects: 92% (13/14) remote: Compressing objects: 100% (14/14) remote: Compressing objects: 100% (14/14), done. remote: Total 18 (delta 1), reused 4 (delta 1), pack-reused 3 
From https://github.com/python/cpython
* branch main -> FETCH_HEAD
Note: switching to '0eb98837b60bc58e57ad3e2b35c6b0e9ab634678'.
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 0eb98837b6 gh-109593: Fix reentrancy issue in multiprocessing resource_tracker (#109629)
Switched to and reset branch 'main'
find: ‘build’: No such file or directoryfind: ‘build’: No such file or directoryfind: ‘build’: No such file or directoryfind: ‘build’: No such file or directorymake[2]: [Makefile:2818: clean-retain-profile] Error 1 (ignored)
./Modules/_decimal/libmpdec/context.c:56: warning: mpd_setminalloc: ignoring request to set MPD_MINALLOC a second time
./Modules/_decimal/libmpdec/context.c:56: warning: mpd_setminalloc: ignoring request to set MPD_MINALLOC a second time
In file included from Python/bltinmodule.c:5:
In function ‘_PyObject_VectorcallTstate’,
inlined from ‘_PyObject_VectorcallTstate’ at ./Include/internal/pycore_call.h:172:1,
inlined from ‘map_next’ at Python/bltinmodule.c:1411:14:
./Include/internal/pycore_call.h:185:16: warning: ‘small_stack’ may be used uninitialized [-Wmaybe-uninitialized]
185 | return _PyObject_MakeTpCall(tstate, callable, args, nargs, kwnames);
|^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~./Include/internal/pycore_call.h: In function ‘map_next’:
./Include/internal/pycore_call.h:126:23: note: by argument 3 of type ‘struct PyObject * const *’ to ‘_PyObject_MakeTpCall’ declared here
126 | PyAPI_FUNC(PyObject*) _PyObject_MakeTpCall(
|^~~~~~~~~~~~~~~~~~~~
Python/bltinmodule.c:1383:15: note: ‘small_stack’ declared here
1383 | PyObject *small_stack[_PY_FASTCALL_SMALL_STACK];
|^~~~~~~~~~~
In function ‘_PyObject_VectorcallTstate’,
inlined from ‘_PyObject_VectorcallTstate’ at ./Include/internal/pycore_call.h:172:1,
inlined from ‘map_next’ at Python/bltinmodule.c:1411:14:
./Include/internal/pycore_call.h:185:16: warning: ‘small_stack’ may be used uninitialized [-Wmaybe-uninitialized]
185 | return _PyObject_MakeTpCall(tstate, callable, args, nargs, kwnames);
|^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~./Include/internal/pycore_call.h: In function ‘map_next’:
./Include/internal/pycore_call.h:126:23: note: by argument 3 of type ‘struct PyObject * const *’ to ‘_PyObject_MakeTpCall’ declared here
126 | PyAPI_FUNC(PyObject*) _PyObject_MakeTpCall(
|^~~~~~~~~~~~~~~~~~~~
Python/bltinmodule.c:1383:15: note: ‘small_stack’ declared here
1383 | PyObject *small_stack[_PY_FASTCALL_SMALL_STACK];
|^~~~~~~~~~~
In function ‘word_to_string’,
inlined from ‘coeff_to_string’ at ./Modules/_decimal/libmpdec/io.c:410:13,
inlined from ‘_mpd_to_string’ at ./Modules/_decimal/libmpdec/io.c:611:18:
./Modules/_decimal/libmpdec/io.c:348:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
348 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
|~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:348:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
348 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
|~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:348:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
348 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
|~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:348:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
348 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
|~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:348:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
348 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
|~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:348:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
348 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
|~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:348:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
348 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
|~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:348:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
348 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
|~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:348:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
348 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
|~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:348:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
348 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
|~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:348:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
348 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
|~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:348:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
348 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
|~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:348:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
348 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
|~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:348:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
348 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
|~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:348:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
348 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
|~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:348:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
348 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
|~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:348:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
348 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
|~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:348:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
348 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
|~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:348:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
348 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
|~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:348:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
348 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
|~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:348:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
348 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
|~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:348:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
348 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
|~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:348:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
348 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
|~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:348:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
348 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
|~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:348:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
348 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
|~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:348:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
348 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
|~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:348:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
348 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
|~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:348:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
348 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
|~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:348:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
348 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
|~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:348:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
348 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
|~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:348:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
./Modules/_decimal/libmpdec/io.c:348:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
348 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
|~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:348: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:410:13,
inlined from ‘_mpd_to_string’ at ./Modules/_decimal/libmpdec/io.c:607:18:
./Modules/_decimal/libmpdec/io.c:348:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
348 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
|~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:348:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
348 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
|~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:348:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
348 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
|~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:348:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
348 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
|~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:348:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
348 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
|~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:348:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
348 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
|~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:348:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
348 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
|~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:348:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
348 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
|~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:348:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
348 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
|~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:348:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
348 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
|~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:348:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
348 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
|~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:348:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
348 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
|~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:348:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
348 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
|~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:348:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
348 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
|~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:348:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
348 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
|~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:348:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
348 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
|~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:348:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
348 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
|~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:348:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
348 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
|~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:348:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
348 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
|~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:348:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
348 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
|~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:348:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
348 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
|~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:348:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
348 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
|~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:348:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
348 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
|~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:348:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
348 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
|~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:348:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
348 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
|~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:348:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
348 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
|~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:348:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
348 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
|~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:348:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
348 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
|~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:348:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
348 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
|~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:348:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
348 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
|~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:348:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
348 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
|~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:348:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
348 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
|~~~~~^~~~~~~~~~~~~~~~~~~~~
./Modules/_decimal/libmpdec/io.c:348:40: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
348 | if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
|~~~~~^~~~~~~~~~~~~~~~~~~~~
In function ‘utf8_toUtf8’,
inlined from ‘toAscii’ at ./Modules/expat/xmltok.c:1043:3,
inlined from ‘doParseXmlDecl’ at ./Modules/expat/xmltok.c:1197:13:
./Modules/expat/xmltok.c:390:5: warning: ‘memcpy’ writing 2 or more bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
390 | memcpy(*toP, *fromP, bytesToCopy);
|^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~./Modules/expat/xmltok.c: In function ‘doParseXmlDecl’:
./Modules/expat/xmltok.c:1041:8: note: destination object ‘buf’ of size 1
1041 | char buf[1];
|^~~
In function ‘utf8_toUtf8’,
inlined from ‘toAscii’ at ./Modules/expat/xmltok.c:1043:3,
inlined from ‘parsePseudoAttribute’ at ./Modules/expat/xmltok.c:1075:9:
./Modules/expat/xmltok.c:390:5: warning: ‘memcpy’ writing 2 or more bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
390 | memcpy(*toP, *fromP, bytesToCopy);
|^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~./Modules/expat/xmltok.c: In function ‘parsePseudoAttribute’:
./Modules/expat/xmltok.c:1041:8: note: destination object ‘buf’ of size 1
1041 | char buf[1];
|^~~
In function ‘utf8_toUtf8’,
inlined from ‘toAscii’ at ./Modules/expat/xmltok.c:1043:3,
inlined from ‘parsePseudoAttribute’ at ./Modules/expat/xmltok.c:1081:12:
./Modules/expat/xmltok.c:390:5: warning: ‘memcpy’ writing 2 or more bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
390 | memcpy(*toP, *fromP, bytesToCopy);
|^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~./Modules/expat/xmltok.c: In function ‘parsePseudoAttribute’:
./Modules/expat/xmltok.c:1041:8: note: destination object ‘buf’ of size 1
1041 | char buf[1];
|^~~
In function ‘utf8_toUtf8’,
inlined from ‘toAscii’ at ./Modules/expat/xmltok.c:1043:3,
inlined from ‘parsePseudoAttribute’ at ./Modules/expat/xmltok.c:1081:12:
./Modules/expat/xmltok.c:390:5: warning: ‘memcpy’ writing 2 or more bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
390 | memcpy(*toP, *fromP, bytesToCopy);
|^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~./Modules/expat/xmltok.c: In function ‘parsePseudoAttribute’:
./Modules/expat/xmltok.c:1041:8: note: destination object ‘buf’ of size 1
1041 | char buf[1];
|^~~
In function ‘utf8_toUtf8’,
inlined from ‘toAscii’ at ./Modules/expat/xmltok.c:1043:3,
inlined from ‘parsePseudoAttribute’ at ./Modules/expat/xmltok.c:1088:9:
./Modules/expat/xmltok.c:390:5: warning: ‘memcpy’ writing 2 or more bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
390 | memcpy(*toP, *fromP, bytesToCopy);
|^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~./Modules/expat/xmltok.c: In function ‘parsePseudoAttribute’:
./Modules/expat/xmltok.c:1041:8: note: destination object ‘buf’ of size 1
1041 | char buf[1];
|^~~
In function ‘utf8_toUtf8’,
inlined from ‘toAscii’ at ./Modules/expat/xmltok.c:1043:3,
inlined from ‘parsePseudoAttribute’ at ./Modules/expat/xmltok.c:1088:9:
./Modules/expat/xmltok.c:390:5: warning: ‘memcpy’ writing 2 or more bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
390 | memcpy(*toP, *fromP, bytesToCopy);
|^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~./Modules/expat/xmltok.c: In function ‘parsePseudoAttribute’:
./Modules/expat/xmltok.c:1041:8: note: destination object ‘buf’ of size 1
1041 | char buf[1];
|^~~
In function ‘utf8_toUtf8’,
inlined from ‘toAscii’ at ./Modules/expat/xmltok.c:1043:3,
inlined from ‘parsePseudoAttribute’ at ./Modules/expat/xmltok.c:1115:7:
./Modules/expat/xmltok.c:390:5: warning: ‘memcpy’ writing 2 or more bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
390 | memcpy(*toP, *fromP, bytesToCopy);
|^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~./Modules/expat/xmltok.c: In function ‘parsePseudoAttribute’:
./Modules/expat/xmltok.c:1041:8: note: destination object ‘buf’ of size 1
1041 | char buf[1];
|^~~
In function ‘utf8_toUtf8’,
inlined from ‘toAscii’ at ./Modules/expat/xmltok.c:1043:3,
inlined from ‘parsePseudoAttribute’ at ./Modules/expat/xmltok.c:1128:9:
./Modules/expat/xmltok.c:390:5: warning: ‘memcpy’ writing 2 or more bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
390 | memcpy(*toP, *fromP, bytesToCopy);
|^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~./Modules/expat/xmltok.c: In function ‘parsePseudoAttribute’:
./Modules/expat/xmltok.c:1041:8: note: destination object ‘buf’ of size 1
1041 | char buf[1];
|^~~
In function ‘utf8_toUtf8’,
inlined from ‘toAscii’ at ./Modules/expat/xmltok.c:1043:3,
inlined from ‘parsePseudoAttribute’ at ./Modules/expat/xmltok.c:1128:9:
./Modules/expat/xmltok.c:390:5: warning: ‘memcpy’ writing 2 or more bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
390 | memcpy(*toP, *fromP, bytesToCopy);
|^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~./Modules/expat/xmltok.c: In function ‘parsePseudoAttribute’:
./Modules/expat/xmltok.c:1041:8: note: destination object ‘buf’ of size 1
1041 | char buf[1];
|^~~
In function ‘utf8_toUtf8’,
inlined from ‘toAscii’ at ./Modules/expat/xmltok.c:1043:3,
inlined from ‘doParseXmlDecl’ at ./Modules/expat/xmltok.c:1197:13:
./Modules/expat/xmltok.c:390:5: warning: ‘memcpy’ writing 2 or more bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
390 | memcpy(*toP, *fromP, bytesToCopy);
|^./Modules/expat/xmltok.c: In function ‘doParseXmlDecl’:
./Modules/expat/xmltok.c:1041:8: note: destination object ‘buf’ of size 1
1041 | char buf[1];
|^
In function ‘utf8_toUtf8’,
inlined from ‘toAscii’ at ./Modules/expat/xmltok.c:1043:3,
inlined from ‘parsePseudoAttribute’ at ./Modules/expat/xmltok.c:1075:9:
./Modules/expat/xmltok.c:390:5: warning: ‘memcpy’ writing 2 or more bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
390 | memcpy(*toP, *fromP, bytesToCopy);
|^./Modules/expat/xmltok.c: In function ‘parsePseudoAttribute’:
./Modules/expat/xmltok.c:1041:8: note: destination object ‘buf’ of size 1
1041 | char buf[1];
|^
In function ‘utf8_toUtf8’,
inlined from ‘toAscii’ at ./Modules/expat/xmltok.c:1043:3,
inlined from ‘parsePseudoAttribute’ at ./Modules/expat/xmltok.c:1081:12:
./Modules/expat/xmltok.c:390:5: warning: ‘memcpy’ writing 2 or more bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
390 | memcpy(*toP, *fromP, bytesToCopy);
|^./Modules/expat/xmltok.c: In function ‘parsePseudoAttribute’:
./Modules/expat/xmltok.c:1041:8: note: destination object ‘buf’ of size 1
1041 | char buf[1];
|^
In function ‘utf8_toUtf8’,
inlined from ‘toAscii’ at ./Modules/expat/xmltok.c:1043:3,
inlined from ‘parsePseudoAttribute’ at ./Modules/expat/xmltok.c:1081:12:
./Modules/expat/xmltok.c:390:5: warning: ‘memcpy’ writing 2 or more bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
390 | memcpy(*toP, *fromP, bytesToCopy);
|^./Modules/expat/xmltok.c: In function ‘parsePseudoAttribute’:
./Modules/expat/xmltok.c:1041:8: note: destination object ‘buf’ of size 1
1041 | char buf[1];
|^
In function ‘utf8_toUtf8’,
inlined from ‘toAscii’ at ./Modules/expat/xmltok.c:1043:3,
inlined from ‘parsePseudoAttribute’ at ./Modules/expat/xmltok.c:1088:9:
./Modules/expat/xmltok.c:390:5: warning: ‘memcpy’ writing 2 or more bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
390 | memcpy(*toP, *fromP, bytesToCopy);
|^./Modules/expat/xmltok.c: In function ‘parsePseudoAttribute’:
./Modules/expat/xmltok.c:1041:8: note: destination object ‘buf’ of size 1
1041 | char buf[1];
|^
In function ‘utf8_toUtf8’,
inlined from ‘toAscii’ at ./Modules/expat/xmltok.c:1043:3,
inlined from ‘parsePseudoAttribute’ at ./Modules/expat/xmltok.c:1088:9:
./Modules/expat/xmltok.c:390:5: warning: ‘memcpy’ writing 2 or more bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
390 | memcpy(*toP, *fromP, bytesToCopy);
|^./Modules/expat/xmltok.c: In function ‘parsePseudoAttribute’:
./Modules/expat/xmltok.c:1041:8: note: destination object ‘buf’ of size 1
1041 | char buf[1];
|^
In function ‘utf8_toUtf8’,
inlined from ‘toAscii’ at ./Modules/expat/xmltok.c:1043:3,
inlined from ‘parsePseudoAttribute’ at ./Modules/expat/xmltok.c:1115:7:
./Modules/expat/xmltok.c:390:5: warning: ‘memcpy’ writing 2 or more bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
390 | memcpy(*toP, *fromP, bytesToCopy);
|^./Modules/expat/xmltok.c: In function ‘parsePseudoAttribute’:
./Modules/expat/xmltok.c:1041:8: note: destination object ‘buf’ of size 1
1041 | char buf[1];
|^
In function ‘utf8_toUtf8’,
inlined from ‘toAscii’ at ./Modules/expat/xmltok.c:1043:3,
inlined from ‘parsePseudoAttribute’ at ./Modules/expat/xmltok.c:1128:9:
./Modules/expat/xmltok.c:390:5: warning: ‘memcpy’ writing 2 or more bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
390 | memcpy(*toP, *fromP, bytesToCopy);
|^./Modules/expat/xmltok.c: In function ‘parsePseudoAttribute’:
./Modules/expat/xmltok.c:1041:8: note: destination object ‘buf’ of size 1
1041 | char buf[1];
|^
In function ‘utf8_toUtf8’,
inlined from ‘toAscii’ at ./Modules/expat/xmltok.c:1043:3,
inlined from ‘parsePseudoAttribute’ at ./Modules/expat/xmltok.c:1128:9:
./Modules/expat/xmltok.c:390:5: warning: ‘memcpy’ writing 2 or more bytes into a region of size 1 overflows the destination [-Wstringop-overflow=]
390 | memcpy(*toP, *fromP, bytesToCopy);
|^./Modules/expat/xmltok.c: In function ‘parsePseudoAttribute’:
./Modules/expat/xmltok.c:1041:8: note: destination object ‘buf’ of size 1
1041 | char buf[1];
|^
In function ‘word_to_string’,
inlined from ‘coeff_to_string’ at ./Modules/_decimal/libmpdec/io.c:410:13:
./Modules/_decimal/libmpdec/io.c:359:14: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
359 | case 15: EXTRACT_DIGIT(s, x, 100000000000000ULL, dot);
|^
./Modules/_decimal/libmpdec/io.c:358:14: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
358 | case 16: EXTRACT_DIGIT(s, x, 1000000000000000ULL, dot);
|^
./Modules/_decimal/libmpdec/io.c:359:14: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
359 | case 15: EXTRACT_DIGIT(s, x, 100000000000000ULL, dot);
|^
./Modules/_decimal/libmpdec/io.c:360:14: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
360 | case 14: EXTRACT_DIGIT(s, x, 10000000000000ULL, dot);
|^
./Modules/_decimal/libmpdec/io.c:357:14: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
357 | case 17: EXTRACT_DIGIT(s, x, 10000000000000000ULL, dot);
|^
./Modules/_decimal/libmpdec/io.c:356:14: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
356 | case 18: EXTRACT_DIGIT(s, x, 100000000000000000ULL, dot);
|^
./Modules/_decimal/libmpdec/io.c:357:14: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
357 | case 17: EXTRACT_DIGIT(s, x, 10000000000000000ULL, dot);
|^
./Modules/_decimal/libmpdec/io.c:358:14: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
358 | case 16: EXTRACT_DIGIT(s, x, 1000000000000000ULL, dot);
|^
./Modules/_decimal/libmpdec/io.c:361:14: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
361 | case 13: EXTRACT_DIGIT(s, x, 1000000000000ULL, dot);
|^
./Modules/_decimal/libmpdec/io.c:360:14: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
360 | case 14: EXTRACT_DIGIT(s, x, 10000000000000ULL, dot);
|^
./Modules/_decimal/libmpdec/io.c:361:14: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
361 | case 13: EXTRACT_DIGIT(s, x, 1000000000000ULL, dot);
|^
./Modules/_decimal/libmpdec/io.c:362:14: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
362 | case 12: EXTRACT_DIGIT(s, x, 100000000000ULL, dot);
|^
./Modules/_decimal/libmpdec/io.c:363:14: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
363 | case 11: EXTRACT_DIGIT(s, x, 10000000000ULL, dot);
|^
./Modules/_decimal/libmpdec/io.c:362:14: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
362 | case 12: EXTRACT_DIGIT(s, x, 100000000000ULL, dot);
|^
./Modules/_decimal/libmpdec/io.c:363:14: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
363 | case 11: EXTRACT_DIGIT(s, x, 10000000000ULL, dot);
|^
./Modules/_decimal/libmpdec/io.c:365:14: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
365 | case 10: EXTRACT_DIGIT(s, x, 1000000000UL, dot);
|^
./Modules/_decimal/libmpdec/io.c:366:14: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
366 | case 9: EXTRACT_DIGIT(s, x, 100000000UL, dot);
|^
./Modules/_decimal/libmpdec/io.c:365:14: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
365 | case 10: EXTRACT_DIGIT(s, x, 1000000000UL, dot);
|^
./Modules/_decimal/libmpdec/io.c:366:14: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
366 | case 9: EXTRACT_DIGIT(s, x, 100000000UL, dot);
|^
./Modules/_decimal/libmpdec/io.c:367:14: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
367 | case 8: EXTRACT_DIGIT(s, x, 10000000UL, dot);
|^
./Modules/_decimal/libmpdec/io.c:368:14: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
368 | case 7: EXTRACT_DIGIT(s, x, 1000000UL, dot);
|^
./Modules/_decimal/libmpdec/io.c:367:14: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
367 | case 8: EXTRACT_DIGIT(s, x, 10000000UL, dot);
|^
./Modules/_decimal/libmpdec/io.c:368:14: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
368 | case 7: EXTRACT_DIGIT(s, x, 1000000UL, dot);
|^
./Modules/_decimal/libmpdec/io.c:369:14: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
369 | case 6: EXTRACT_DIGIT(s, x, 100000UL, dot);
|^
./Modules/_decimal/libmpdec/io.c:370:14: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
370 | case 5: EXTRACT_DIGIT(s, x, 10000UL, dot);
|^
./Modules/_decimal/libmpdec/io.c:369:14: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
369 | case 6: EXTRACT_DIGIT(s, x, 100000UL, dot);
|^
./Modules/_decimal/libmpdec/io.c:370:14: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
370 | case 5: EXTRACT_DIGIT(s, x, 10000UL, dot);
|^
./Modules/_decimal/libmpdec/io.c:371:14: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
371 | case 4: EXTRACT_DIGIT(s, x, 1000UL, dot);
|^
./Modules/_decimal/libmpdec/io.c:372:14: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
372 | case 3: EXTRACT_DIGIT(s, x, 100UL, dot);
|^
./Modules/_decimal/libmpdec/io.c:371:14: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
371 | case 4: EXTRACT_DIGIT(s, x, 1000UL, dot);
|^
./Modules/_decimal/libmpdec/io.c:372:14: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
372 | case 3: EXTRACT_DIGIT(s, x, 100UL, dot);
|^
./Modules/_decimal/libmpdec/io.c:373:14: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
373 | case 2: EXTRACT_DIGIT(s, x, 10UL, dot);
|^
./Modules/_decimal/libmpdec/io.c:373:14: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
make: *** [Makefile:2037: buildbottest] Error 5

csm10495 pushed a commit to csm10495/cpython that referenced this pull request Sep 28, 2023
…cker (python#109629)
---------
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Yhg1s pushed a commit that referenced this pull request Oct 2, 2023
…acker (GH-109629) (#109898)
gh-109593: Fix reentrancy issue in multiprocessing resource_tracker (GH-109629)
---------
(cherry picked from commit 0eb9883)
Co-authored-by: Antoine Pitrou <antoine@python.org>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
@pitrou
pitrou deleted the gh109593-ensure-running-reentrant branch October 2, 2023 16:03
Glyphack pushed a commit to Glyphack/cpython that referenced this pull request Sep 2, 2024
…cker (python#109629)
---------
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@pitrou@bedevere-bot@itocamotito@vstinner@miss-islington