-
Notifications
You must be signed in to change notification settings - Fork 27
Description
AROS initially used to have a different filesystem API (not the AOS 68k compatible packet based one). There it was not a problem that code did not make sure that some things like "FileInfoBlock" (or other structs which embed this, like AnchorPath used for pattern matching) were not LONG word aligned. Also on other CPUs (x86) AROS used BPTR == APTR, ie. no multiply/devide by 4 in BADDR/MKBADDR. So even less an issue in this cases.
But with AOS 68k compatible filesystem and real BPTRs (multiplied/divided by 4) there's code in AROS sources which is broken because it does not make sure the structures like FileInfoBlock or AnchorPath are aligned correctly. And this will cause problems/crashes.
For example workbench/c/Copy.c contains such buggy code.
Just look for code which creates this structs on the stack (and does not use explicit alignment tricks) and does not allocate them.
Maybe add debug output to functions like rom/dos/examine.c to see if functions gets called with non aligned fileinfoblock.
(realized after seeing a "... MatchFirst/MatchNext ..." thread on www.amigans.net)