Project

General

Profile

« Previous | Next » 

Revision 273dca3a

Added by peterzhu2118 (Peter Zhu) over 2 years ago

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 memory
location of VALUE * that was casted from a rb_shape_t **.

This was causing test failures when compiled with LTO.

Fixes [Bug #19248]

Co-Authored-By: Alan Wu