-
NARUSE, Yui authored
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 <alanwu@ruby-lang.org> --- shape.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-)
NARUSE, Yui authoredFix 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 <alanwu@ruby-lang.org> --- shape.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-)
Loading