[Scummvm-tracker] [ScummVM :: Bugs] #16144: LASTEXPRESS: SIGBUS with packed 'struct Message'
ScummVM :: Bugs
trac at scummvm.org
Sat Aug 9 13:51:51 UTC 2025
#16144: LASTEXPRESS: SIGBUS with packed 'struct Message'
---------------------+---------------------------------
Reporter: dwatteau | Owner: (none)
Type: defect | Status: new
Priority: normal | Component: Engine: LastExpress
Version: | Keywords:
Game: |
---------------------+---------------------------------
Trying to start the game on either a strict-alignment platform, or through
UBSan on a more regular setup, shows the following problem
{{{
User picked target 'lastexpress' (engine ID 'lastexpress', game ID
'lastexpress')...
Running The Last Express (Interplay Release/English)
CD1.HPF: 8c86db47304033fcff32c69fddd5a920, 525522944 bytes.
CD2.HPF: 58aa26e782d10ec5d2231e539d2fe6a2, 669581312 bytes.
CD3.HPF: 00554fbf78a2ad391d98578fbbbe1c48, 641128448 bytes.
HD.HPF: bcc32d977f92bb52c060a0b4e8589cac, 30715904 bytes.
engines/lastexpress/game/events.h:33:2: runtime error: constructor call on
misaligned address 0x00012e00d414 for type 'LastExpress::ConsCallParam *',
which requires 8 byte alignment
0x00012e00d414: note: pointer points here
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00
^
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior
engines/lastexpress/game/events.h:33:2 in
engines/lastexpress/game/events.h:33:2: runtime error: constructor call on
misaligned address 0x00012e00d414 for type 'LastExpress::ConsCallParam *',
which requires 8 byte alignment
0x00012e00d414: note: pointer points here
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00
^
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior
engines/lastexpress/game/events.h:33:2 in
}}}
(I'm also attaching a GDB backtrace below, on a device where the engine
immediately crashes because of this.)
If I remove the struct packing headers set around `struct Message` in
`game/events.h`, then the engine appears to run fine, even on that picky
old MIPS64 netbook of mine. (Not that this weird machine itself matters,
but strict-alignment issues could cause errors on some ports such as PSP,
3DS, or some other old ARM devices.)
Questions are:
* maybe the struct packing really is here for a good reason,
* and I don't know if changing this can have an effect on save
compatibilities, or stuff like that
Hence this ticket for now ;)
--
Ticket URL: <https://bugs.scummvm.org/ticket/16144>
ScummVM :: Bugs <https://bugs.scummvm.org>
ScummVM
More information about the Scummvm-tracker
mailing list