Skip to content
  • NARUSE, Yui's avatar
    08ae7f64
    merge revision(s) 273dca3a: [Backport #19248] · 08ae7f64
    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: default avatarAlan Wu <alanwu@ruby-lang.org>
    	---
    	 shape.c | 13 +++++++++++--
    	 1 file changed, 11 insertions(+), 2 deletions(-)
    08ae7f64
    merge revision(s) 273dca3a: [Backport #19248]
    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: default avatarAlan Wu <alanwu@ruby-lang.org>
    	---
    	 shape.c | 13 +++++++++++--
    	 1 file changed, 11 insertions(+), 2 deletions(-)
Loading