Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 454500 - unaligned access warnings from libresolv
Summary: unaligned access warnings from libresolv
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: glibc
Version: rawhide
Hardware: ia64
OS: Linux
high
high
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: fedora-ia64
TreeView+ depends on / blocked
 
Reported: 2008-07-08 20:21 UTC by Doug Chapman
Modified: 2008-07-20 08:54 UTC (History)
1 user (show)

Fixed In Version: 2.8.90-9
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-07-20 08:54:47 UTC


Attachments (Terms of Use)

Description Doug Chapman 2008-07-08 20:21:08 UTC
Description of problem:
Recent versions of libresolv from glibc-2.8.90 and above are hitting a massive
number of unaligned access warnings.  This are commonly seem when using yum.

yum(6912): unaligned access to 0x60000fffffe5fdbe, ip=0x20000000069569f1
yum(6912): unaligned access to 0x60000fffffe5fdbe, ip=0x2000000006956a10
yum(6912): unaligned access to 0x60000fffffe5fdbe, ip=0x2000000006956a40
yum(6912): unaligned access to 0x60000fffffe5fdbe, ip=0x2000000006959350
yum(6912): unaligned access to 0x60000fffffe60885, ip=0x200000000695b6d0


The culprit appears to bit this bit of code in resolv/res_query.c


    143             n = res_nmkquery(statp, QUERY, name, class, T_A, NULL, 0, NULL,
    144                              query1, bufsize);
    145             if (n > 0)
    146               {
    147                 if ((oflags & RES_F_EDNS0ERR) == 0
    148                     && (statp->options & RES_USE_EDNS0) != 0)
    149                   n = __res_nopt(statp, n, query1, bufsize, anslen / 2);
    150 
    151                 nquery1 = n;
    152                 query2 = buf + nquery1;
    153                 n = res_nmkquery(statp, QUERY, name, class, T_AAAA, NULL, 0,
    154                                  NULL, query2, bufsize - n);


I think what is happening here is the first call to res_nmkquery (line 153)
returns a 1 and also the if statement on lines 147/148 is false.  Then we add 1
to buf which is always going to give is an unaligned pointer.  Much of this is a
guess however.  I am not quite sure what the code is trying to do here.

It really looks like we are missing { } after the line 147/148 if statement.

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


How reproducible:
100%

Steps to Reproduce:
1. on ia64 with recent rawhide bits run yum
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Ulrich Drepper 2008-07-09 17:59:32 UTC
Should now be fixed upstream.

Comment 2 Ulrich Drepper 2008-07-20 08:54:47 UTC
Should be fixed in 2.8.90-9.  Reopen if necessary.


Note You need to log in before you can comment on or make changes to this bug.