Skip to content

Commit 948d4a6

Browse files
authored
[SIMD] Avoid comparing V8 to other VMs when relaxed SIMD is enabled (#7461)
That spec allows for differences between VMs, so we must disable most comparisons.
1 parent 3ca38d8 commit 948d4a6

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

scripts/fuzz_opt.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,11 +152,13 @@ def randomize_feature_opts():
152152
# The shared-everything feature is new and we want to fuzz it, but it
153153
# also currently disables fuzzing V8, so disable it most of the time.
154154
# Same with custom descriptors and strings - all these cannot be run in
155-
# V8 for now.
155+
# V8 for now. Relaxed SIMD's nondeterminism disables much but not all of
156+
# our V8 fuzzing, so avoid it too.
156157
if random.random() < 0.9:
157158
FEATURE_OPTS.append('--disable-shared-everything')
158159
FEATURE_OPTS.append('--disable-custom-descriptors')
159160
FEATURE_OPTS.append('--disable-strings')
161+
FEATURE_OPTS.append('--disable-relaxed-simd')
160162

161163
print('randomized feature opts:', '\n ' + '\n '.join(FEATURE_OPTS))
162164

@@ -828,8 +830,10 @@ def can_compare_to_self(self):
828830

829831
def can_compare_to_others(self):
830832
# If not legalized, the JS will fail immediately, so no point to
831-
# compare to others.
832-
return LEGALIZE and not NANS
833+
# compare to others. Relaxed SIMD allows different behavior
834+
# between VMs (in principle we could compare to other D8
835+
# variants, though TODO).
836+
return self.can_compare_to_self() and LEGALIZE and all_disallowed(['relaxed-simd'])
833837

834838
class D8Liftoff(D8):
835839
name = 'd8_liftoff'

0 commit comments

Comments
 (0)