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 — assertion failure in Python/ast.c in case of a bad unicodedata.normalize() · Issue #75773 · python/cpython

assertion failure in Python/ast.c in case of a bad unicodedata.normalize() #75773

New issue
Copy link
New issue
Copy link
Closed
Closed
assertion failure in Python/ast.c in case of a bad unicodedata.normalize()#75773
Copy link
Labels
3.7 (EOL)end of lifeend of lifeinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-crashA hard crash of the interpreter, possibly with a core dumpA hard crash of the interpreter, possibly with a core dump

Description

orenmn
mannequin
opened on Sep 26, 2017
Issue body actions
BPO 31592
Nosy @brettcannon, @ncoghlan, @vstinner, @benjaminp, @serhiy-storchaka, @1st1, @orenmn
PRs
  • bpo-31592: Fix an assertion failure in Python/ast.c in case of a bad unicodedata.normalize() #3767
  • [3.6] bpo-31592: Fix an assertion failure in Python parser in case of a bad unicodedata.normalize(). (GH-3767) #3836
  • 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 2017-09-30.19:54:36.492>
    created_at = <Date 2017-09-26.12:54:08.971>
    labels = ['interpreter-core', '3.7', 'type-crash']
    title = 'assertion failure in Python/ast.c in case of a bad unicodedata.normalize()'
    updated_at = <Date 2017-09-30.19:54:36.491>
    user = 'https://github.com/orenmn'

    bugs.python.org fields:

    activity = <Date 2017-09-30.19:54:36.491>
    actor = 'serhiy.storchaka'
    assignee = 'none'
    closed = True
    closed_date = <Date 2017-09-30.19:54:36.492>
    closer = 'serhiy.storchaka'
    components = ['Interpreter Core']
    creation = <Date 2017-09-26.12:54:08.971>
    creator = 'Oren Milman'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 31592
    keywords = ['patch']
    message_count = 4.0
    messages = ['303036', '303043', '303416', '303420']
    nosy_count = 7.0
    nosy_names = ['brett.cannon', 'ncoghlan', 'vstinner', 'benjamin.peterson', 'serhiy.storchaka', 'yselivanov', 'Oren Milman']
    pr_nums = ['3767', '3836']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'crash'
    url = 'https://bugs.python.org/issue31592'
    versions = ['Python 3.6', 'Python 3.7']

    Activity

    1. orenmn commented on Sep 26, 2017

      @orenmn
      orenmnmannequin
      on Sep 26, 2017
      MannequinAuthor
      More actions

      The following code causes an assertion failure:

      import unicodedata
      def bad_normalize(*args):
          return None
      
      unicodedata.normalize = bad_normalize
      import ast
      ast.parse('\u03D5')

      This is because init_normalization() (in Python/ast.c) assumes that
      unicodedata.normalize() is valid, and stores it in the compiling struct.
      Later, new_identifier() calls the stored function, assumes it returned a
      string, and passes it to PyUnicode_InternInPlace(), which asserts it is a
      string.

    2. orenmn
      added
      3.7 (EOL)end of lifeend of life
      interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)
      type-crashA hard crash of the interpreter, possibly with a core dumpA hard crash of the interpreter, possibly with a core dump
      on Sep 26, 2017
    3. serhiy-storchaka commented on Sep 26, 2017

      @serhiy-storchaka
      serhiy-storchaka
      on Sep 26, 2017
      Member
      More actions

      Oh, and passing arguments to this function is tricky. If faked unicodedata.normalize save the args tuple it will see a mutated tuple containing a hanging reference.

      This is a good opportunity of using the fast call protocol.

    4. serhiy-storchaka commented on Sep 30, 2017

      @serhiy-storchaka
      serhiy-storchaka
      on Sep 30, 2017
      Member
      More actions

      New changeset 7dc46d8 by Serhiy Storchaka (Oren Milman) in branch 'master':
      bpo-31592: Fix an assertion failure in Python parser in case of a bad unicodedata.normalize(). (bpo-3767)
      7dc46d8

    5. serhiy-storchaka commented on Sep 30, 2017

      @serhiy-storchaka
      serhiy-storchaka
      on Sep 30, 2017
      Member
      More actions

      New changeset a4dfe1c by Serhiy Storchaka (Miss Islington (bot)) in branch '3.6':
      [3.6] bpo-31592: Fix an assertion failure in Python parser in case of a bad unicodedata.normalize(). (GH-3767) (bpo-3836)
      a4dfe1c

    6. serhiy-storchaka
      closed this as completedon Sep 30, 2017
    7. ezio-melotti
      transferred this issue fromon Apr 10, 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

      3.7 (EOL)end of lifeend of lifeinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-crashA hard crash of the interpreter, possibly with a core dumpA hard crash of the interpreter, possibly with a core dump

      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.