[New-bugs-announce] [issue4884] Work around gethostbyaddr_r bug

Jeffrey Yasskin report at bugs.python.org
Thu Jan 8 20:08:15 CET 2009


New submission from Jeffrey Yasskin <jyasskin at gmail.com>:

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.

----------
components: Extension Modules
files: fix_gethostbyaddr.patch
keywords: patch
messages: 79429
nosy: collinwinter, jyasskin
severity: normal
stage: patch review
status: open
title: Work around gethostbyaddr_r bug
type: crash
versions: Python 2.6, Python 2.7, Python 3.0, Python 3.1
Added file: http://bugs.python.org/file12654/fix_gethostbyaddr.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue4884>
_______________________________________


More information about the New-bugs-announce mailing list