Under strict aliasing, writing to the memory location of a different
type is not allowed and will result in undefined behavior. This was
happening in shape.c due to rb_id_table_lookup writing to the memory
location of VALUE * that was casted from a rb_shape_t **.
This was causing test failures when compiled with LTO.
Fix undefined behavior in shape.c
Under strict aliasing, writing to the memory location of a different
type is not allowed and will result in undefined behavior. This was
happening in shape.c due to
rb_id_table_lookup
writing to the memorylocation of
VALUE *
that was casted from arb_shape_t **
.This was causing test failures when compiled with LTO.
Fixes [Bug #19248]
Co-Authored-By: Alan Wu [email protected]