Skip to content

New warning on main: writing 1 byte into a region of size 0 [-Wstringop-overflow=] #129467

Closed

Description

@sobolevn

Bug report

Bug description:

This happens in Modules/_decimal/libmpdec/io.c
Here:

#define EXTRACT_DIGIT(s, x, d, dot) \
if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d

Image

CPython versions tested on:

CPython main branch

Operating systems tested on:

Linux

Linked PRs

Activity

  1. skirpichev commented on Jan 30, 2025

    @skirpichev
    Member

    I doubt it's a new one, see #108562. See patch: #116346.

    Probably someone (me?:)) should just post that to the mpdecimal maillist.

  2. added
    pendingThe issue will be closed if no feedback is provided
    on Jan 30, 2025
  3. sobolevn commented on Jan 30, 2025

    @sobolevn
    MemberAuthor

    In any case, it affects our CI, so we should take appropriate steps to resolve this issue.

  4. removed
    pendingThe issue will be closed if no feedback is provided
    on Jan 30, 2025
  5. skirpichev commented on Jan 30, 2025

    @skirpichev
    Member

    Ok, #116346 restored.

  6. vstinner commented on Jan 30, 2025

    @vstinner
    Member

    Probably someone (me?:)) should just post that to the mpdecimal maillist.

    Yes, otherwise, we will loose the patch next time that we update mpdecimal.

    Note: we plan to remove the vendored libmpdecimal copy in Python 3.15: https://docs.python.org/dev/whatsnew/3.14.html#id11

  7. skirpichev commented on Jan 30, 2025

    @skirpichev
    Member

    Yes

    Stefan participated in the old issue thread. So, he is aware on the problem. If this patch wasn't included in 4.0.0 - maybe he consider this as a non-issue for the mpdecimal.

    next time that we update mpdecimal

    I don't think there is much sense to do this. The mpdecimal seems to be a complete project (implementation of the IBM spec). For bugfixes or performance improvements people should just use upstream sources.

    Note: we plan to remove the vendored libmpdecimal copy in Python 3.15

    (Someone should convince Debian people to restore mpdecimal package.)

  8. added a commit that references this issue on Jan 30, 2025
  9. vstinner commented on Jan 30, 2025

    @vstinner
    Member

    Fixed by the change 6c63afc.

  10. added a commit that references this issue on Feb 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    extension-modulesC modules in the Modules dirtype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions