Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python/hamt.c warnings #76888

Closed
vstinner opened this issue Jan 29, 2018 · 4 comments
Closed

Python/hamt.c warnings #76888

vstinner opened this issue Jan 29, 2018 · 4 comments
Labels
3.7 (EOL) end of life interpreter-core (Objects, Python, Grammar, and Parser dirs)

Comments

@vstinner
Copy link
Member

BPO 32707
Nosy @vstinner, @asvetlov, @1st1
PRs
  • bpo-32707: Fix warnings in hamt.c #5430
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2018-01-29.18:32:06.748>
    created_at = <Date 2018-01-29.12:31:06.525>
    labels = ['interpreter-core', '3.7']
    title = 'Python/hamt.c warnings'
    updated_at = <Date 2018-01-29.18:32:16.520>
    user = 'https://github.com/vstinner'

    bugs.python.org fields:

    activity = <Date 2018-01-29.18:32:16.520>
    actor = 'yselivanov'
    assignee = 'none'
    closed = True
    closed_date = <Date 2018-01-29.18:32:06.748>
    closer = 'yselivanov'
    components = ['Interpreter Core']
    creation = <Date 2018-01-29.12:31:06.525>
    creator = 'vstinner'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 32707
    keywords = ['patch']
    message_count = 4.0
    messages = ['311112', '311153', '311155', '311156']
    nosy_count = 3.0
    nosy_names = ['vstinner', 'asvetlov', 'yselivanov']
    pr_nums = ['5430']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue32707'
    versions = ['Python 3.7']

    @vstinner
    Copy link
    Member Author

    https://ci.appveyor.com/project/python/cpython/build/3.7build11469

    ..\Python\hamt.c(623): warning C4018: '<': signed/unsigned mismatch [C:\projects\cpython\PCbuild\pythoncore.vcxproj]
    ..\Python\hamt.c(937): warning C4018: '<': signed/unsigned mismatch [C:\projects\cpython\PCbuild\pythoncore.vcxproj]

    IMHO it's a real bug, the warning must not be made quiet. HAMT doesn't support sizes larger than UINT32_MAX. HAMT must either fail to create if size is larger than UINT32_MAX, or the code should be fixed to use wider C types (larger than uint32_t, like uint64_t).

    @vstinner vstinner added topic-asyncio 3.7 (EOL) end of life interpreter-core (Objects, Python, Grammar, and Parser dirs) labels Jan 29, 2018
    @1st1
    Copy link
    Member

    1st1 commented Jan 29, 2018

    IMHO it's a real bug,

    No. HAMT bitmap and array nodes can only store up to 32 pointers, so we use Py_ssize_t & Py_SIZE only because those nodes are PyObject_VAR_HEAD objects.

    @1st1
    Copy link
    Member

    1st1 commented Jan 29, 2018

    New changeset b647d70 by Yury Selivanov in branch 'master':
    bpo-32707: Fix warnings in hamt.c (bpo-5430)
    b647d70

    @1st1
    Copy link
    Member

    1st1 commented Jan 29, 2018

    Hopefully the warnings will be fixed.

    @1st1 1st1 closed this as completed Jan 29, 2018
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.7 (EOL) end of life interpreter-core (Objects, Python, Grammar, and Parser dirs)
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants