summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxime Chevalier-Boisvert <maximechevalierb@gmail.com>2022-08-10 16:38:42 -0400
committerTakashi Kokubun <takashikkbn@gmail.com>2022-08-29 08:47:10 -0700
commitb54643d13ac4194f05151a366e9980350efec829 (patch)
tree98e3b6d6af2b53dfd8da8ba7c860d84623f7f30b
parentdf84832c758e3dcb360f18335c2c93dcc90344aa (diff)
downloadruby-b54643d13ac4194f05151a366e9980350efec829.tar.gz
Handle out of memory tests (https://github.com/Shopify/ruby/pull/393)
-rw-r--r--.cirrus.yml6
-rw-r--r--yjit/src/backend/arm64/mod.rs5
-rw-r--r--yjit/src/backend/x86_64/mod.rs4
3 files changed, 9 insertions, 6 deletions
diff --git a/.cirrus.yml b/.cirrus.yml
index 51aadfc6be..3425ebd175 100644
--- a/.cirrus.yml
+++ b/.cirrus.yml
@@ -160,10 +160,8 @@ yjit_task:
bootstraptest/test_yjit_30k_ifelse.rb \
bootstraptest/test_yjit_30k_methods.rb \
bootstraptest/test_yjit_new_backend.rb \
- bootstraptest/test_yjit_rust_port.rb
-
- # These are the btests we can't run yet on arm:
- #bootstraptest/test_yjit.rb (out of executable memory not handled)
+ bootstraptest/test_yjit_rust_port.rb \
+ bootstraptest/test_yjit.rb
# FIXME: not currently working on CI, missing cargo
# Check that we can do a full ruby build
diff --git a/yjit/src/backend/arm64/mod.rs b/yjit/src/backend/arm64/mod.rs
index fac77f972d..440c4368c5 100644
--- a/yjit/src/backend/arm64/mod.rs
+++ b/yjit/src/backend/arm64/mod.rs
@@ -866,7 +866,10 @@ impl Assembler
}
let gc_offsets = asm.arm64_emit(cb);
- cb.link_labels();
+
+ if !cb.has_dropped_bytes() {
+ cb.link_labels();
+ }
gc_offsets
}
diff --git a/yjit/src/backend/x86_64/mod.rs b/yjit/src/backend/x86_64/mod.rs
index 9fcbb69a68..417474ee68 100644
--- a/yjit/src/backend/x86_64/mod.rs
+++ b/yjit/src/backend/x86_64/mod.rs
@@ -561,7 +561,9 @@ impl Assembler
let gc_offsets = asm.x86_emit(cb);
- cb.link_labels();
+ if !cb.has_dropped_bytes() {
+ cb.link_labels();
+ }
gc_offsets
}