From: Philipp R. <pr...@pa...> - 2000-11-23 13:07:09
|
On Tue, Nov 21, 2000 at 01:27:29PM -0800, Bryan Rittmeyer wrote: > Jesper Skov wrote: > > > I don't agree. Nasty DOS you could get out of that - simply make an > > infinite loop read from odd addresses and the kernel will be wasting > > tons of time fixing up those accesses. User space apps should die if > > they do unaligned access. > > As a tangential question, is there a way to have the build process > (gcc/as/whatever) warn on unaligned access? Obviously there are some gas warns about unaligned .longs. gcc should never generate unaligned accesses unless you use weird casting or assembler code. > (most?) that it can't catch because the pointer changes at run time. But > I would really like some error/warning if the linker places a > structure's long on a non-long boundary, for instance. shouldn't happen. > handled this problem... no kernel message, it just terminates the damn > thing? It sends a SIGSEGV. I'm currently looking into adding a siginfo struct with sufficient information to emulate unaligned accesses efficiently. > higher level developers should not have to worry about their process > suddenly dying because of some architecture specific alignment behavior. Write portable code and it won't. > I am bothered by the current behavior of just killing the process with > no squawk... That is not robust, and is not easy to debug for people who > are not completely familiar with all of the LinuxSH4 internals. If you don't see your process's exit status your test environment is broken. if the process doesn't die with SEGV there's another kernel bug. |