This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/6942] New: Unaligned access in resolv


On Linux/ia64, I got

[hjl@gnu-11 build-ia64-linux]$
/export/build/gnu/glibc-nptl/build-ia64-linux/elf/ld-linux-ia64.so.2
--library-path
/export/build/gnu/glibc-nptl/build-ia64-linux:/export/build/gnu/glibc-nptl/build-ia64-linux/math:/export/build/gnu/glibc-nptl/build-ia64-linux/resolv
/export/build/gnu/glibc-nptl/build-ia64-linux/posix/bug-ga2
ld-linux-ia64.s(13112): unaligned access to 0x60000fffffffa65e,
ip=0x20000008004294b0
ld-linux-ia64.s(13112): unaligned access to 0x60000fffffffa65e,
ip=0x2000000800429b20
ld-linux-ia64.s(13112): unaligned access to 0x60000fffffffa65e,
ip=0x20000008004294b0
ld-linux-ia64.s(13112): unaligned access to 0x60000fffffffa65e,
ip=0x2000000800429b20
ld-linux-ia64.s(13112): unaligned access to 0x60000fffffffa65e,
ip=0x20000008004294b0
[hjl@gnu-11 build-ia64-linux]$

It happens at

(gdb) bt
#0  __libc_res_nsend (statp=0x20000000002bafe8,
    buf=0x60000fffffff9c40 "\234\020\001", buflen=29,
    buf2=0x60000fffffff9c60 "ê\004\001", buflen2=29,
    ans=0x60000fffffffa6d0 "ê\004\201\200", anssiz=2048,
    ansp=0x60000fffffffaef0, ansp2=0x60000fffffffaef8,
    nansp2=0x60000fffffff9c18, resplen2=0x60000fffffff996c) at res_send.c:1136
#1  0x2000000000326650 in *__GI___libc_res_nquery (statp=0x20000000002bafe8,
    name=0x4000000000000ba0 "www.gnu.org", class=1, type=62321,
    answer=0x60000fffffffa6d0 "ê\004\201\200", anslen=2048,
    answerp=0x60000fffffffaef0, answerp2=0x60000fffffffaef8,
    nanswerp2=0x60000fffffffaee0, resplen2=0x60000fffffffaee4)
    at res_query.c:225
#2  0x2000000000326da0 in __libc_res_nquerydomain (statp=0x20000000002bafe8,
    name=0x4000000000000ba0 "www.gnu.org", domain=0x0, class=1, type=62321,
    answer=0x60000fffffffa6d0 "ê\004\201\200", anslen=2048,
    answerp=0x60000fffffffaef0, answerp2=0x60000fffffffaef8,
    nanswerp2=0x60000fffffffaee0, resplen2=0x60000fffffffaee4)
    at res_query.c:569
#3  0x2000000000327590 in *__GI___libc_res_nsearch (statp=0x20000000002bafe8,
    name=0x4000000000000ba0 "www.gnu.org", class=1, type=62321,
    answer=<value optimized out>, anslen=2048, answerp=0x60000fffffffaef0,
    answerp2=0x60000fffffffaef8, nanswerp2=0x60000fffffffaee0,
    resplen2=0x60000fffffffaee4) at res_query.c:370
---Type <return> to continue, or q <return> to quit---
#4  0x2000000000304730 in _nss_dns_gethostbyname4_r (
    name=0x4000000000000ba0 "www.gnu.org", pat=0x60000fffffffb3c0,
    buffer=0x60000fffffffaf30 "\177", buflen=1024, errnop=0x60000fffffffb3b0,
    herrnop=0x60000fffffffb3b4, ttlp=0x0) at nss_dns/dns-host.c:304
#5  0x20000000001ba3d0 in gaih_inet (name=0x4000000000000ba0 "www.gnu.org",
    service=<value optimized out>, req=0x60000fffffffb558,
    pai=0x60000fffffffb420, naddrs=0x60000fffffffb414)
    at ../sysdeps/posix/getaddrinfo.c:714
#6  0x20000000001beb20 in *__GI_getaddrinfo (
    name=0x4000000000000ba0 "www.gnu.org", service=0x4000000000000bb0 "http",
    hints=0x60000fffffffb558, pai=0x60000fffffffb550)
    at ../sysdeps/posix/getaddrinfo.c:2154
#7  0x4000000000000930 in main () at bug-ga2.c:20
(gdb)

Do we need to align the buffer to HEADER before calling
__libc_res_nsearch?

-- 
           Summary: Unaligned access in resolv
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
        AssignedTo: drepper at redhat dot com
        ReportedBy: hjl dot tools at gmail dot com
                CC: glibc-bugs at sources dot redhat dot com


http://sourceware.org/bugzilla/show_bug.cgi?id=6942

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]