Bug 243967

Summary: gethostbyname_r generates alignment errors under g++
Product: Red Hat Enterprise Linux 5 Reporter: Tim Potter <tpot>
Component: glibcAssignee: Jakub Jelinek <jakub>
Status: CLOSED ERRATA QA Contact: Brian Brock <bbrock>
Severity: low Docs Contact:
Priority: low    
Version: 5.0   
Target Milestone: ---   
Target Release: ---   
Hardware: ia64   
OS: Linux   
Whiteboard:
Fixed In Version: RHBA-2007-0619 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-11-07 18:33:14 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Test program none

Description Tim Potter 2007-06-13 04:48:14 UTC
Description of problem:

The small test program, attached, simply calls gethostname() then
gethostbyname_r() to return the FQDN for the host.  It produces an ia64 aligned
access error when compiled under gcc, but not under g++.

Version-Release number of selected component (if applicable):

RHEL5 installed from RHEL5-Server-20070208.0-ia64 ISO images
glibc-2.5-12
gcc-4.1.1-52.el5
gcc-c++-4.1.1-52.el5

How reproducible:

Always.

Steps to Reproduce:
1.
2.
3.
  
Actual results:

[tpot@harland ~]$ gcc -o gethostbyname_r gethostbyname_r.c -g
[tpot@harland ~]$ ./gethostbyname_r
harland.cao.cpqcorp.net

[tpot@harland ~]$ g++ -o gethostbyname_r gethostbyname_r.c -g
[tpot@harland ~]$ ./gethostbyname_r
gethostbyname_r(10905): unaligned access to 0x60000ffffe3c174f,
ip=0x20000000005cdf01
gethostbyname_r(10905): unaligned access to 0x60000ffffe3c1757,
ip=0x20000000005cdf10
gethostbyname_r(10905): unaligned access to 0x60000ffffe3c173f,
ip=0x20000000005fe6f0
gethostbyname_r(10905): unaligned access to 0x60000ffffe3c18cf,
ip=0x20000000005fe711
gethostbyname_r(10905): unaligned access to 0x60000ffffe3c18cf,
ip=0x20000000005febd0
harland.cao.cpqcorp.net

Expected results:


Additional info:

Comment 1 Tim Potter 2007-06-13 04:48:14 UTC
Created attachment 156845 [details]
Test program

Comment 3 RHEL Program Management 2007-06-13 10:13:30 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 5 Jakub Jelinek 2007-06-18 11:22:02 UTC
You can try http://people.redhat.com/jakub/glibc/2.5-16.1/ (not gone through QA
yet, so please use it for testing only).

Comment 6 Tim Potter 2007-06-19 00:38:11 UTC
Thanks Jakub.  Installing the new version of glibc fixes the problem.

Comment 10 errata-xmlrpc 2007-11-07 18:33:14 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2007-0619.html