diff options
Diffstat (limited to 'lang/ruby/3.2/patches/patch-template_builtin_binary_inc_tmpl')
| -rw-r--r-- | lang/ruby/3.2/patches/patch-template_builtin_binary_inc_tmpl | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lang/ruby/3.2/patches/patch-template_builtin_binary_inc_tmpl b/lang/ruby/3.2/patches/patch-template_builtin_binary_inc_tmpl new file mode 100644 index 0000000..6c1c8e4 --- /dev/null +++ b/lang/ruby/3.2/patches/patch-template_builtin_binary_inc_tmpl | |||
| @@ -0,0 +1,15 @@ | |||
| 1 | Ensure proper alignment of builtin binary arrays to fix crash on mips64. | ||
| 2 | compile.c accesses the start of these arrays as struct ibf_header. | ||
| 3 | |||
| 4 | Index: template/builtin_binary.inc.tmpl | ||
| 5 | --- template/builtin_binary.inc.tmpl.orig | ||
| 6 | +++ template/builtin_binary.inc.tmpl | ||
| 7 | @@ -6,7 +6,7 @@ | ||
| 8 | % ary = RubyVM.enum_for(:each_builtin).to_a | ||
| 9 | % ary.each{|feature, iseq| | ||
| 10 | |||
| 11 | -static const unsigned char <%= feature %>_bin[] = { | ||
| 12 | +static const unsigned char <%= feature %>_bin[] __attribute__((aligned(8))) = { | ||
| 13 | % iseq \ | ||
| 14 | % . to_binary \ | ||
| 15 | % . each_byte \ | ||
