diff options
author | Peter Zhu <peter@peterzhu.ca> | 2023-01-05 08:48:19 -0500 |
---|---|---|
committer | Peter Zhu <peter@peterzhu.ca> | 2023-01-05 13:14:11 -0500 |
commit | 273dca3aed7989120d57f80c789733d4bc870ffe (patch) | |
tree | 24534fe1f7c9263218d94009589958c6e80710cb /time.c | |
parent | 54950a78e3cd66da8c52e7444b2fbf761153660b (diff) | |
download | ruby-273dca3aed7989120d57f80c789733d4bc870ffe.tar.gz |
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>
Diffstat (limited to 'time.c')
0 files changed, 0 insertions, 0 deletions