mirror of
https://github.com/BinomialLLC/basis_universal.git
synced 2026-09-16 23:44:29 +00:00
The original implementation was dereferencing a nullptr which is an undefined behavior according to the C++ spec. It was triggering some automatic errors during our sanitizer tests (asan with nullptr check). The fix replaces the offset with standard implementation of offsetof that uses compiler built in instructions when available (avoiding the undefined behavior).