blob: 6c1c8e426b077bf4b74e72286230920acd71ac57 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
Ensure proper alignment of builtin binary arrays to fix crash on mips64.
compile.c accesses the start of these arrays as struct ibf_header.
Index: template/builtin_binary.inc.tmpl
--- template/builtin_binary.inc.tmpl.orig
+++ template/builtin_binary.inc.tmpl
@@ -6,7 +6,7 @@
% ary = RubyVM.enum_for(:each_builtin).to_a
% ary.each{|feature, iseq|
-static const unsigned char <%= feature %>_bin[] = {
+static const unsigned char <%= feature %>_bin[] __attribute__((aligned(8))) = {
% iseq \
% . to_binary \
% . each_byte \
|