Skip to content

Repack fields to fix undefined behavior in rasterize

Fixes these UBSan errors from the unit test suite when rasterizing a Boolean HEALPix mask image:

ligo/skymap/tool/tests/test_bayestar.py src/bayestar_moc.c:109:27: runtime error: load of misaligned address 0x7febfedc6009 for type 'const int64_t', which requires 8 byte alignment
0x7febfedc6009: note: pointer points here
 00 00 00  01 61 61 2d 00 00 00 00  00 01 66 61 2d 00 00 00  00 00 01 73 61 2d 00 00  00 00 00 01 38
Edited by Leo P. Singer

Merge request reports

Loading