GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — 3.12 - PyASCIIObject state only 31 bits in size, should be 32 · Issue #99706 · python/cpython

3.12 - PyASCIIObject state only 31 bits in size, should be 32 #99706

New issue
Copy link
New issue
Copy link
Closed
Closed
3.12 - PyASCIIObject state only 31 bits in size, should be 32#99706
Copy link
Labels
type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Description

@davidhewitt
davidhewitt
opened on Nov 22, 2022
Issue body actions

Looking at

cpython/Include/cpython/unicodeobject.h

Lines 136 to 138 in d4cf192

/* Padding to ensure that PyUnicode_DATA() is always aligned to
4 bytes (see issue #19537 on m68k). */
unsigned int :25;

I believe the bitfield is intended to have 32 bits, however summing the fields 1 + 3 + 1 + 1 + 25 = 31.

This only appears to affect 3.12, as the interned field has reduced from 2 bits to 1 bit, and the ready bit has been removed, but the padding was only increased from 24 to 25.

Linked PRs

  • gh-99706: unicodeobject: Fix padding in PyASCIIObject.state #99707

Activity

  1. davidhewitt
    added
    type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
    on Nov 22, 2022
  2. davidhewitt
    changed the title [-]3.12 - PyAsciiObject state only 31 bits in size, should be 32[/-] [+]3.12 - PyASCIIObject state only 31 bits in size, should be 32[/+] on Nov 22, 2022
  3. methane
    added a commit that references this issue on Nov 24, 2022

    gh-99706: unicodeobject: Fix padding in `PyASCIIObject.state` (GH-99707)

    b4d54a3
  4. kumaraditya303
    closed this as completedon Nov 24, 2022
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

    type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.