• bmeurer's avatar
    [turbofan] Bailout if LoadBuffer typing assumption doesn't hold. · 58ab990a
    bmeurer authored
    The LoadBuffer operator that is used for asm.js heap access claims to
    return only the appropriate typed array type, but out of bounds access
    could make it return undefined. So far we tried to "repair" the graph
    later if we see that our assumption was wrong, and for various reasons
    that worked for some time. But now that wrong type information that is
    propagated earlier is picked up appropriately and thus we generate wrong
    code, i.e. we in the repro case we feed NaN into ChangeFloat64Uint32 and
    thus get 2147483648 instead of 0 (with proper JS truncation).
    
    This was always considered a temporary hack until we have a proper
    asm.js pipeline, but since we still run asm.js through the generic
    JavaScript pipeline, we have to address this now. Quickfix is to just
    bailout from the pipeline when we see that the LoadBuffer type was
    wrong, i.e. the result of LoadBuffer is not properly truncated and thus
    undefined or NaN would be observable.
    
    R=mstarzinger@chromium.org, jarin@chromium.org
    BUG=chromium:589792
    LOG=y
    
    Review URL: https://codereview.chromium.org/1740123002
    
    Cr-Commit-Position: refs/heads/master@{#34322}
    58ab990a
Name
Last commit
Last update
..
c-signature.h Loading commit data...
call-tester.h Loading commit data...
codegen-tester.cc Loading commit data...
codegen-tester.h Loading commit data...
function-tester.h Loading commit data...
graph-builder-tester.h Loading commit data...
test-basic-block-profiler.cc Loading commit data...
test-branch-combine.cc Loading commit data...
test-changes-lowering.cc Loading commit data...
test-code-stub-assembler.cc Loading commit data...
test-gap-resolver.cc Loading commit data...
test-graph-visualizer.cc Loading commit data...
test-instruction.cc Loading commit data...
test-js-constant-cache.cc Loading commit data...
test-js-context-specialization.cc Loading commit data...
test-js-typed-lowering.cc Loading commit data...
test-jump-threading.cc Loading commit data...
test-linkage.cc Loading commit data...
test-loop-analysis.cc Loading commit data...
test-loop-assignment-analysis.cc Loading commit data...
test-machine-operator-reducer.cc Loading commit data...
test-multiple-return.cc Loading commit data...
test-node.cc Loading commit data...
test-operator.cc Loading commit data...
test-osr.cc Loading commit data...
test-pipeline.cc Loading commit data...
test-representation-change.cc Loading commit data...
test-run-bytecode-graph-builder.cc Loading commit data...
test-run-deopt.cc Loading commit data...
test-run-inlining.cc Loading commit data...
test-run-intrinsics.cc Loading commit data...
test-run-jsbranches.cc Loading commit data...
test-run-jscalls.cc Loading commit data...
test-run-jsexceptions.cc Loading commit data...
test-run-jsobjects.cc Loading commit data...
test-run-jsops.cc Loading commit data...
test-run-machops.cc Loading commit data...
test-run-native-calls.cc Loading commit data...
test-run-stackcheck.cc Loading commit data...
test-run-stubs.cc Loading commit data...
test-run-variables.cc Loading commit data...
test-simplified-lowering.cc Loading commit data...
value-helper.h Loading commit data...