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

Work around gethostbyaddr_r bug #49134

Closed
jyasskin mannequin opened this issue Jan 8, 2009 · 4 comments
Closed

Work around gethostbyaddr_r bug #49134

jyasskin mannequin opened this issue Jan 8, 2009 · 4 comments
Labels
extension-modules C modules in the Modules dir type-crash A hard crash of the interpreter, possibly with a core dump

Comments

@jyasskin
Copy link
Mannequin

jyasskin mannequin commented Jan 8, 2009

BPO 4884
Files
  • fix_gethostbyaddr.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 2009-01-09.18:51:16.648>
    created_at = <Date 2009-01-08.19:08:14.134>
    labels = ['extension-modules', 'type-crash']
    title = 'Work around gethostbyaddr_r bug'
    updated_at = <Date 2009-01-10.17:51:23.972>
    user = 'https://bugs.python.org/jyasskin'

    bugs.python.org fields:

    activity = <Date 2009-01-10.17:51:23.972>
    actor = 'jyasskin'
    assignee = 'none'
    closed = True
    closed_date = <Date 2009-01-09.18:51:16.648>
    closer = 'jyasskin'
    components = ['Extension Modules']
    creation = <Date 2009-01-08.19:08:14.134>
    creator = 'jyasskin'
    dependencies = []
    files = ['12654']
    hgrepos = []
    issue_num = 4884
    keywords = ['patch']
    message_count = 4.0
    messages = ['79429', '79485', '79546', '79564']
    nosy_count = 3.0
    nosy_names = ['collinwinter', 'jyasskin', 'rpetrov']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'crash'
    url = 'https://bugs.python.org/issue4884'
    versions = ['Python 2.6', 'Python 3.0', 'Python 3.1', 'Python 2.7']

    @jyasskin
    Copy link
    Mannequin Author

    jyasskin mannequin commented Jan 8, 2009

    glibc until 2.10 has a bug in gethostbyaddr_r that assumes the buffer
    argument is 8-byte aligned
    (http://sources.redhat.com/ml/libc-alpha/2009-01/msg00000.html). gcc
    seems to always provide such alignment for the call in
    socketmodule.c:socket_gethostbyaddr(), but llvm-gcc (possibly only HEAD,
    not 2.4) does not, which causes a segfault in test_socket.py. The llvm
    bug investigating the problem is http://llvm.org/bugs/show_bug.cgi?id=3233.

    The attached patch specifies the alignment so that llvm-gcc and unfixed
    glibcs work together.

    I'll commit this tomorrow if there are no objections.

    @jyasskin jyasskin mannequin added extension-modules C modules in the Modules dir type-crash A hard crash of the interpreter, possibly with a core dump labels Jan 8, 2009
    @jyasskin
    Copy link
    Mannequin Author

    jyasskin mannequin commented Jan 9, 2009

    Committed as r68450.

    @jyasskin jyasskin mannequin closed this as completed Jan 9, 2009
    @rpetrov
    Copy link
    Mannequin

    rpetrov mannequin commented Jan 10, 2009

    What about socket_gethostbyname_ex() ?

    @jyasskin
    Copy link
    Mannequin Author

    jyasskin mannequin commented Jan 10, 2009

    socket_gethostbyname_ex() calls gethostbyname_r() rather than
    gethostbyaddr_r(), and that appears not to have the bug.

    @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
    extension-modules C modules in the Modules dir type-crash A hard crash of the interpreter, possibly with a core dump
    Projects
    None yet
    Development

    No branches or pull requests

    0 participants