• ahaas's avatar
    [wasm] Refactor the non-determinism detection in the interpreter. · ac187c03
    ahaas authored
    Apparently it happens quite easily that different NaNs are produced in
    the interpreter than in the execution of the compiled code. This
    non-determinism caused problems for the fuzzer which compares the
    equality of the results of the interpreter and the compiled code.
    
    I decided therefore to refactor the detection of non-determinism in the
    interpreter. Instead of tracking whether potentially non-deterministic
    NaNs were produced, I track now whether potentially non-deterministic
    NaNs could have been observed. The only way the NaN non-determinism can
    be observed is by observing the non-deterministic bit pattern of the
    NaN. AFAICT the only way to observe the bit pattern is with a
    I(32|64)_REINTERPRET_F(32|64) instruction or with a F(32|64)_STORE
    followed by a load. Therefore I flag an execution as potentially
    non-deterministic when either a NaN is reinterpreted to an int, or when
    a NaN is stored to memory.
    
    R=titzer@chromium.org, eholk@chromium.org
    BUG=682180
    
    Review-Url: https://codereview.chromium.org/2671803002
    Cr-Commit-Position: refs/heads/master@{#42917}
    ac187c03
Name
Last commit
Last update
..
OWNERS Loading commit data...
decoder.h Loading commit data...
function-body-decoder.cc Loading commit data...
function-body-decoder.h Loading commit data...
leb-helper.h Loading commit data...
managed.h Loading commit data...
module-decoder.cc Loading commit data...
module-decoder.h Loading commit data...
signature-map.cc Loading commit data...
signature-map.h Loading commit data...
wasm-debug.cc Loading commit data...
wasm-external-refs.cc Loading commit data...
wasm-external-refs.h Loading commit data...
wasm-interpreter.cc Loading commit data...
wasm-interpreter.h Loading commit data...
wasm-js.cc Loading commit data...
wasm-js.h Loading commit data...
wasm-limits.h Loading commit data...
wasm-macro-gen.h Loading commit data...
wasm-module-builder.cc Loading commit data...
wasm-module-builder.h Loading commit data...
wasm-module.cc Loading commit data...
wasm-module.h Loading commit data...
wasm-objects.cc Loading commit data...
wasm-objects.h Loading commit data...
wasm-opcodes.cc Loading commit data...
wasm-opcodes.h Loading commit data...
wasm-result.cc Loading commit data...
wasm-result.h Loading commit data...
wasm-text.cc Loading commit data...
wasm-text.h Loading commit data...