Closed alewycky-tenstorrent closed 4 months ago
This is due to UBSAN believing that mappings
in
struct tenstorrent_query_mappings_out {
struct tenstorrent_mapping mappings[0];
};
is truly a zero-size array. When replaced with a flexible array member, no UBSAN warning is reported.
Directly replacing mappings[0]
with mappings[]
is not allowed as C doesn't allow a FAM to be the only field in a structure. Instead I have to replace tenstorrent_query_mappings.out
with mappings[]
.