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

ctypes.utils uninitialized variable 'paths' #68302

Closed
kees mannequin opened this issue May 2, 2015 · 8 comments
Closed

ctypes.utils uninitialized variable 'paths' #68302

kees mannequin opened this issue May 2, 2015 · 8 comments
Assignees
Labels
easy topic-ctypes type-bug An unexpected behavior, bug, or error

Comments

@kees
Copy link
Mannequin

kees mannequin commented May 2, 2015

BPO 24114
Nosy @amauryfa, @abalkin, @meadori, @vadmium, @zhangyangyu
Files
  • ctypes.util-path.patch: patch for uninitialized variable 'path'
  • issue24114.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 = 'https://github.com/meadori'
    closed_at = <Date 2016-05-01.03:32:51.262>
    created_at = <Date 2015-05-02.15:03:15.182>
    labels = ['easy', 'ctypes', 'type-bug']
    title = "ctypes.utils uninitialized variable 'paths'"
    updated_at = <Date 2016-05-01.03:32:51.260>
    user = 'https://bugs.python.org/kees'

    bugs.python.org fields:

    activity = <Date 2016-05-01.03:32:51.260>
    actor = 'meador.inge'
    assignee = 'meador.inge'
    closed = True
    closed_date = <Date 2016-05-01.03:32:51.262>
    closer = 'meador.inge'
    components = ['ctypes']
    creation = <Date 2015-05-02.15:03:15.182>
    creator = 'kees'
    dependencies = []
    files = ['39267', '42637']
    hgrepos = []
    issue_num = 24114
    keywords = ['patch', 'easy']
    message_count = 8.0
    messages = ['242401', '243288', '243299', '264425', '264426', '264428', '264577', '264578']
    nosy_count = 7.0
    nosy_names = ['amaury.forgeotdarc', 'belopolsky', 'kees', 'meador.inge', 'python-dev', 'martin.panter', 'xiang.zhang']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue24114'
    versions = ['Python 2.7', 'Python 3.5', 'Python 3.6']

    @kees
    Copy link
    Mannequin Author

    kees mannequin commented May 2, 2015

    In certain corner cases, the ctypes.util can raise an error for a uninitialized variable 'path' when with sunos5 the clre program exists, but fails to return valid output lines.

    (Also in 2.7.10rc0)

    @kees kees mannequin added type-crash A hard crash of the interpreter, possibly with a core dump topic-ctypes labels May 2, 2015
    @ned-deily ned-deily removed the type-crash A hard crash of the interpreter, possibly with a core dump label May 5, 2015
    @vadmium
    Copy link
    Member

    vadmium commented May 16, 2015

    I fail to see how this patch does anything. What is the actual error or traceback? Perhaps it is for “paths” (plural)?

    @kees
    Copy link
    Mannequin Author

    kees mannequin commented May 16, 2015

    Sorry, yes. It's plural: 'paths'

    @vadmium vadmium changed the title ctypes.utils uninitialized variable 'path' ctypes.utils uninitialized variable 'paths' Apr 25, 2016
    @vadmium vadmium added the type-bug An unexpected behavior, bug, or error label Apr 25, 2016
    @zhangyangyu
    Copy link
    Member

    Simply add one line to make the function theoretically more robust.

    @kees
    Copy link
    Mannequin Author

    kees mannequin commented Apr 28, 2016

    It's not entirely theoretical to me. I inherited some solaris boxes that cannot be properly maintained anymore and that have a clre program that dumps core. Hence no valid output and running into uninitialized 'paths'. The patch from Xiang Zhang will fix that.

    @meadori
    Copy link
    Member

    meadori commented Apr 28, 2016

    Xiang's patch LGTM. Given that Kees has verified it, I will apply today.

    @meadori meadori self-assigned this Apr 28, 2016
    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented May 1, 2016

    New changeset 57bf7a40925f by Meador Inge in branch '2.7':
    Issue bpo-24114: Fix an uninitialized variable in ctypes.util.
    https://hg.python.org/cpython/rev/57bf7a40925f

    New changeset db5baad7ad69 by Meador Inge in branch '3.5':
    Issue bpo-24114: Fix an uninitialized variable in ctypes.util.
    https://hg.python.org/cpython/rev/db5baad7ad69

    New changeset 5b5fbce1db9c by Meador Inge in branch 'default':
    Issue bpo-24114: Fix an uninitialized variable in ctypes.util.
    https://hg.python.org/cpython/rev/5b5fbce1db9c

    @meadori
    Copy link
    Member

    meadori commented May 1, 2016

    Fixed.

    Thank y'all for the patch and help with testing.

    @meadori meadori closed this as completed May 1, 2016
    @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
    easy topic-ctypes type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    5 participants