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

Crash (constructed) in _PySequence_BytesToCharpArray() #59937

Closed
skrah mannequin opened this issue Aug 20, 2012 · 4 comments
Closed

Crash (constructed) in _PySequence_BytesToCharpArray() #59937

skrah mannequin opened this issue Aug 20, 2012 · 4 comments
Labels
interpreter-core (Objects, Python, Grammar, and Parser dirs) type-crash A hard crash of the interpreter, possibly with a core dump

Comments

@skrah
Copy link
Mannequin

skrah mannequin commented Aug 20, 2012

BPO 15732
Nosy @loewis, @skrah
Files
  • bytes_to_charp_array.diff
  • 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 2012-08-20.09:21:34.418>
    created_at = <Date 2012-08-20.07:43:20.307>
    labels = ['interpreter-core', 'type-crash']
    title = 'Crash (constructed) in _PySequence_BytesToCharpArray()'
    updated_at = <Date 2012-08-20.09:21:34.351>
    user = 'https://github.com/skrah'

    bugs.python.org fields:

    activity = <Date 2012-08-20.09:21:34.351>
    actor = 'skrah'
    assignee = 'none'
    closed = True
    closed_date = <Date 2012-08-20.09:21:34.418>
    closer = 'skrah'
    components = ['Interpreter Core']
    creation = <Date 2012-08-20.07:43:20.307>
    creator = 'skrah'
    dependencies = []
    files = ['26919']
    hgrepos = []
    issue_num = 15732
    keywords = ['patch']
    message_count = 4.0
    messages = ['168633', '168634', '168637', '168638']
    nosy_count = 3.0
    nosy_names = ['loewis', 'skrah', 'python-dev']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'crash'
    url = 'https://bugs.python.org/issue15732'
    versions = ['Python 3.2', 'Python 3.3']

    @skrah
    Copy link
    Mannequin Author

    skrah mannequin commented Aug 20, 2012

    Coverity found an unchecked return value in _PySequence_BytesToCharpArray().
    Patch attached.

    A demonstration:

    import _posixsubprocess
    class Z(object):
        def __len__(self):
            return 1

    _posixsubprocess.fork_exec(1,Z(),3,[1, 2],5,6,7,8,9,10,11,12,13,14,15,16,17)

    @skrah skrah mannequin added interpreter-core (Objects, Python, Grammar, and Parser dirs) type-crash A hard crash of the interpreter, possibly with a core dump labels Aug 20, 2012
    @loewis
    Copy link
    Mannequin

    loewis mannequin commented Aug 20, 2012

    LGTM. Please apply to all affected branches.

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Aug 20, 2012

    New changeset cfddcf964ff0 by Stefan Krah in branch '3.2':
    Issue bpo-15732: Fix (constructed) crash in _PySequence_BytesToCharpArray().
    http://hg.python.org/cpython/rev/cfddcf964ff0

    @skrah
    Copy link
    Mannequin Author

    skrah mannequin commented Aug 20, 2012

    Thanks for reviewing!

    @skrah skrah mannequin closed this as completed Aug 20, 2012
    @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
    interpreter-core (Objects, Python, Grammar, and Parser dirs) type-crash A hard crash of the interpreter, possibly with a core dump
    Projects
    None yet
    Development

    No branches or pull requests

    0 participants