On Sat, May 27, 2006 at 10:56:09AM -0500, Bob Tracy wrote:
Sjoerd Simons wrote:
Unfortunately I don't have an alpha lying around, so i can't reproduce this :). Afaik an unaligned trap doesn't do any harm, it's just a performance hit.

That's pretty much my observation as well: no real harm being done that
I can tell, just the warning messages that aren't really flagged as such.

Note that unaligned accesses are fatal on the buildds and on all sparc machines, so you really don't want to have unaligned accesses. Also note that alpha and ia64 machines can turn off unaligned traps, so that the kernel will kill off the process like it does on sparc. Unofficial Debian policy is that unaligned accesses are not allowed.

I confess to being not much good with a debugger, but I do just fine
with diagnostic printf()'s (assuming the compiler doesn't "help" too
much by moving things around).

A debugger really is the best tool here. Recompile hal without optimization (use DEB_BUILD_OPTS=noopt,nostrip). Use "sudo gdb /usr/lib/hal/hald-runner <pid>" to attach. You have to be root because hald-runner is running with privileges. Then, look up the address that triggered the bug, and type "disassemble <address>". It will give you a function name as part of the disassembly, and you should report that function to the bug. Then, we'll have the problem narrowed down to one function.

If you CC me on that, I will try to investigate the problem.

I'll retrieve a copy of the source package and start playing around with
it.  If I find out anything useful, I'll let you know.  On the assumption
(most certainly valid) that you know more about this than I do, what am I
looking for?  Suboptimally chosen pointer/variable sizes?  "Weird"
structure layouts?  Questionable (implicit) typecasts?

All of these are possible. Unfortunately, there isn't one that stands out much more than the others, although explicit typecasts are common, especially from a less-aligned type (such as char) to a more-aligned type (such as int or long).

--
brian m. carlson / brian with sandals: Houston, Texas, US
+1 713 440 7475 | http://crustytoothpaste.ath.cx/~bmc | My opinion only
a typesetting engine: http://crustytoothpaste.ath.cx/~bmc/code/thwack
OpenPGP: RSA v4 4096b 88AC E9B2 9196 305B A994 7552 F1BA 225C 0223 B187

Attachment: signature.asc
Description: Digital signature

Reply via email to