Re: unaligned access using bash on glibc 2.5

Aurelien Jarno <[email protected]>
Newsgroups gmane.linux.ports.hppa
Message-ID <[email protected]>
Carlos O'Donell a écrit :
> On 5/1/07, Aurelien Jarno <[email protected]> wrote:
>> We have just switched to a glibc 2.5 using LT + TLS in Debian. This
>> causes unaligned memory access when using bash:
>>
>> bash(19279): unaligned access to 0x000e1bb2 at ip=0x407cb76b
> 
> Why doesn't this ip match the runtime disassembly you have below?

Well I don't really now. The address return by the kernel is not
aligned, so that's strange. Note that this does not correspond to the
same execution. I run it once to get the entry in the kernel log, and
once with unaligned=signal to get the SIGBUS in gdb.

The address (computed using the contents of r1) matches.

>> Using prctl to trap on aligned access and gdb, the unaligned access
>> seems to be in closedir() (a glibc function), at the point marked by
>> a '*'.
> 
> Is this a dump from disassemble in gdb at runtime?

Yes, running in prctl --unaligned=signal

> What is the value of r19, r2, and r30 at the point of the unaligned access?

rp             0x40bcb753       1086109523
r19            0xe05c6  918982
sp             0xc04b4c00       3226160128

>> The problem does not look obvious (at least to me). Any idea?
> 
> Yes, but I need answers to my three questions :-)

Thanks for your help.

Cheers,
Aurelien

-- 
  .''`.  Aurelien Jarno	            | GPG: 1024D/F1BCDB73
 : :' :  Debian developer           | Electrical Engineer
 `. `'   [email protected]         | [email protected]
   `-    people.debian.org/~aurel32 | www.aurel32.net
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.