This incredibly difficult problem to track down might be of interest to people here. The below patch fixes the emulator on a system with gcc 4.1.2 (and probably other compilers). Obviously the __attribute__ may not be totally portable...
Other gcc 4 build problems are well documented, but not this one as far as I know.
----------
The buffer "buffer" has to be aligned on a 2 byte boundary. On an odd byte
boundary we get the error at startup:
Hardware exception #3 occurred while the emulator was
calling the Palm OS function "DlkDispatchRequest". The
emulator is now in an unstable state and will reset.
An odd byte boundary (and the above error) is typical with gcc 4.1.2 on x86.
--- SrcShared/Miscellaneous.cpp.orig 2002-03-30 01:11:15.000000000 +1200
+++ SrcShared/Miscellaneous.cpp 2007-10-25 02:41:24.000000000 +1300
@@ -1370,7 +1370,7 @@
char buffer[ sizeof (DlpReqHeaderType) +
sizeof (DlpTinyArgWrapperType) +
sizeof (DlpWriteUserInfoReqHdrType) +
- dlpMaxUserNameSize];
+ dlpMaxUserNameSize] __attribute__((__aligned__(2)));
// Get handy pointers to all of the above. DlpReqHeaderType\* reqHdr = \(DlpReqHeaderType\*\) buffer;