[前][次][番号順一覧][スレッド一覧]

ruby-changes:60771

From: Takashi <ko1@a...>
Date: Tue, 14 Apr 2020 15:10:29 +0900 (JST)
Subject: [ruby-changes:60771] 70b7304f03 (master): Ignore AppVeyor vs120's pdb corruption

https://git.ruby-lang.org/ruby.git/commit/?id=70b7304f03

From 70b7304f036a55d526e3c67fe31ad3ce949ae13f Mon Sep 17 00:00:00 2001
From: Takashi Kokubun <takashikkbn@g...>
Date: Mon, 13 Apr 2020 23:08:24 -0700
Subject: Ignore AppVeyor vs120's pdb corruption

We tried to fix this like https://github.com/ruby/ruby/pull/3029, but it
didn't work. The failure has never been helpful for developing MJIT, and
currently it's not prioritized to be fixed. Until we try to figure out
the root cause on AppVeyor vs120, let's optionally disable testing when
the random corruption happens.

diff --git a/test/lib/jit_support.rb b/test/lib/jit_support.rb
index b44c94f..c9cbde2 100644
--- a/test/lib/jit_support.rb
+++ b/test/lib/jit_support.rb
@@ -57,6 +57,18 @@ module JITSupport https://github.com/ruby/ruby/blob/trunk/test/lib/jit_support.rb#L57
     end && RbConfig::CONFIG["MJIT_SUPPORT"] != 'no' && !PENDING_RUBYCI_NICKNAMES.include?(ENV['RUBYCI_NICKNAME'])
   end
 
+  # AppVeyor's Visual Studio 2013 is known to spuriously generate broken pch / pdb, like:
+  # error C2859: c:\projects\ruby\x64-mswin_120\include\ruby-2.8.0\x64-mswin64_120\rb_mjit_header-2.8.0.pdb
+  # is not the pdb file that was used when this precompiled header was created, recreate the precompiled header.
+  # https://ci.appveyor.com/project/ruby/ruby/builds/32159878/job/l2p38snw8yxxpp8h
+  #
+  # Until we figure out why, this allows us to skip testing JIT when it happens.
+  def vs120_pdb_corrupted?
+    return false unless ENV.key?('APPVEYOR') && RbConfig::CONFIG['MJIT_CC'].include?('Microsoft Visual Studio 12.0')
+    _stdout, stderr, status = eval_with_jit_without_retry('proc {}.call', verbose: 2, min_calls: 1)
+    !status.success? && stderr.include?('.pdb is not the pdb file that was used when this precompiled header was created, recreate the precompiled header.')
+  end
+
   def remove_mjit_logs(stderr)
     if RubyVM::MJIT.enabled? # utility for -DFORCE_MJIT_ENABLE
       stderr.gsub(/^MJIT warning: Skipped to compile unsupported instruction: \w+\n/m, '')
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]