--- a/test/test_stackprof.rb
+++ b/test/test_stackprof.rb
@@ -233,6 +233,9 @@
   end
 
   def test_gc
+    if RUBY_PLATFORM.include?('riscv64')
+      skip "Skipping test_gc on RISC-V architecture"
+    end
     profile = StackProf.run(interval: 100, raw: true) do
       5.times do
         GC.start
