darktable
darktable copied to clipboard
module order change causes misaligned acces
current master release-4.1.0-109-g4ea7e5d5c
if i switch from legacy to modern raw order (or backwards) in darkroom dt crashes: /home/martin/c/darktable/src/common/iop_order.c:2184:23: runtime error: load of misaligned address 0x61b000079396 for type 'int32_t', which requires 4 byte alignment 0x61b000079396: note: pointer points here 70 61 72 65 00 00 00 00 06 00 00 00 69 6e 76 65 72 74 00 00 00 00 0b 00 00 00 74 65 6d 70 65 72
Tried on current master and couldn't reproduce. Perhaps steps to reproduce would be helpful as well as the rest of the information in the template.
Did you build with sanitizers enabled? that is from asan i believe
Looking at the code, I see that the serialized IOP order list consists of repetitions of (32-bit int)(ASCIZ string)(32-bit int). And since the string length including NUL is not usually not a multiple of 4, you'll get the misaligned accesses any time dt_ioppr_deserialize_iop_order_list
is called. The fix would involve a function that reads four individual bytes and builds the int from them.
This issue did not get any activity in the past 60 days and will be closed in 365 days if no update occurs. Please check if the master branch has fixed it and report again or close the issue.
This issue was closed because it has been inactive for 300 days since being marked as stale. Please check if the newest release or nightly build has it fixed. Please, create a new issue if the issue is not fixed.