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

wrong assumption in pystate.c #54006

Closed
pitrou opened this issue Sep 8, 2010 · 4 comments
Closed

wrong assumption in pystate.c #54006

pitrou opened this issue Sep 8, 2010 · 4 comments
Labels
type-crash A hard crash of the interpreter, possibly with a core dump

Comments

@pitrou
Copy link
Member

pitrou commented Sep 8, 2010

BPO 9797
Nosy @amauryfa, @pitrou, @kristjanvalur
Files
  • autotlskey.patch
  • autotlskey2.patch
  • 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 2010-09-08.12:49:23.491>
    created_at = <Date 2010-09-08.11:11:19.990>
    labels = ['type-crash']
    title = 'wrong assumption in pystate.c'
    updated_at = <Date 2010-09-08.12:49:23.489>
    user = 'https://github.com/pitrou'

    bugs.python.org fields:

    activity = <Date 2010-09-08.12:49:23.489>
    actor = 'pitrou'
    assignee = 'none'
    closed = True
    closed_date = <Date 2010-09-08.12:49:23.491>
    closer = 'pitrou'
    components = []
    creation = <Date 2010-09-08.11:11:19.990>
    creator = 'pitrou'
    dependencies = []
    files = ['18794', '18795']
    hgrepos = []
    issue_num = 9797
    keywords = ['patch']
    message_count = 4.0
    messages = ['115858', '115860', '115861', '115866']
    nosy_count = 3.0
    nosy_names = ['amaury.forgeotdarc', 'pitrou', 'kristjan.jonsson']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'crash'
    url = 'https://bugs.python.org/issue9797'
    versions = ['Python 3.1', 'Python 2.7', 'Python 3.2']

    @pitrou
    Copy link
    Member Author

    pitrou commented Sep 8, 2010

    pystate.c assumes that when autoTLSkey is 0, it hasn't been created yet. However, some TLS implementations can return 0 as a valid key value. Lots of interesting things then happen.

    Here is a patch.

    @pitrou pitrou added the type-crash A hard crash of the interpreter, possibly with a core dump label Sep 8, 2010
    @amauryfa
    Copy link
    Member

    amauryfa commented Sep 8, 2010

    Couldn't the patch use autoInterpreterState instead?
    It is already modified at the same times as autoTLSkey.

    @pitrou
    Copy link
    Member Author

    pitrou commented Sep 8, 2010

    Ok, it is simpler indeed. Here is an updated patch.

    @pitrou
    Copy link
    Member Author

    pitrou commented Sep 8, 2010

    Committed in r84623 (3.x), r84627 (2.7) and r84628 (3.1).

    @pitrou pitrou closed this as completed Sep 8, 2010
    @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
    type-crash A hard crash of the interpreter, possibly with a core dump
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants