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 /include/ruby/internal/encoding | |
| parent | 54950a78e3cd66da8c52e7444b2fbf761153660b (diff) | |
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>
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/7067
Diffstat (limited to 'include/ruby/internal/encoding')
0 files changed, 0 insertions, 0 deletions
