Skip to contentSkip to conversation

unaligned access using bash on glibc 2.5

parisc-linux Aurelien Jarno 1 participant 1 message May 1, 2007 2 messages not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

#2 lore raw
Quoted 7 lines · Carlos O'Donell
Quoted 4 lines · Aurelien Jarno

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.

Quoted 5 lines
Quoted 3 lines

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

Quoted 1 line

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
Quoted 3 lines
Quoted 1 line

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

Signature · 8 lines
  .''`.  Aurelien Jarno	            | GPG: 1024D/F1BCDB73
 : :' :  Debian developer           | Electrical Engineer
 `. `'   [email protected]         | [email protected]
   `-    people.debian.org/~aurel32 | www.aurel32.net
_______________________________________________
parisc-linux mailing list
[email protected]
http://lists.parisc-linux.org/mailman/listinfo/parisc-linux