Skip to content

Fix UndefinedBehaviourSanitizer runtime errors

Da Yu Tou requested to merge dtou_fix_ubsan_errors into master

Fixes the runtime errors in #431. Solves problem 2 in #263 (closed).

  1. Memory alignment errors in are fixed with memcpy.
  2. Workaround negative value bit shift left error by reinterpreting initial int16 as uint16 and applying left bit shift on resulting positive integer. (I can provide a test script to confirm the behaviour is the same as before)
Edited by Da Yu Tou

Merge request reports