From b54643d13ac4194f05151a366e9980350efec829 Mon Sep 17 00:00:00 2001 From: Maxime Chevalier-Boisvert Date: Wed, 10 Aug 2022 16:38:42 -0400 Subject: [PATCH] Handle out of memory tests (https://github.com/Shopify/ruby/pull/393) --- .cirrus.yml | 6 ++---- yjit/src/backend/arm64/mod.rs | 5 ++++- yjit/src/backend/x86_64/mod.rs | 4 +++- 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 }