V8 correctness failure in configs: x64,ignition:x64,slow_path |
|||
Issue descriptionDetailed report: https://clusterfuzz.com/testcase?key=6230639735734272 Fuzzer: foozzie_js_mutation Job Type: v8_foozzie Platform Id: linux Crash Type: V8 correctness failure Crash Address: Crash State: configs: x64,ignition:x64,slow_path sources: 290 Sanitizer: address (ASAN) Regressed: https://clusterfuzz.com/revisions?job=v8_foozzie&range=50381:50382 Reproducer Testcase: https://clusterfuzz.com/download?testcase_id=6230639735734272 Issue filed automatically. See https://github.com/google/clusterfuzz-tools for more information.
,
Sep 7
Some turbofan/ignition error message difference. PTAL compiler folks.
// My minimized repro:
v = {};
v.__proto__ = String.prototype.split;
function foo(func, ...args) {
try {
func.apply(undefined, args);
} catch (e) {
return "!" + e;
}
}
print(JSON.stringify(foo(v)));
%OptimizeFunctionOnNextCall(foo);
print(JSON.stringify(foo(v)));
// foozzie output:
# Compared x64,ignition with x64,ignition_turbo
#
# Flags of x64,ignition:
--abort_on_stack_or_string_length_overflow --expose-gc --allow-natives-syntax --invoke-weak-callbacks --omit-quit --es-staging --wasm-num-compilation-tasks=0 --suppress-asm-messages --random-seed 1743351996 --turbo-filter=~ --noopt --liftoff --no-wasm-tier-up
# Flags of x64,ignition_turbo:
--abort_on_stack_or_string_length_overflow --expose-gc --allow-natives-syntax --invoke-weak-callbacks --omit-quit --es-staging --wasm-num-compilation-tasks=0 --suppress-asm-messages --random-seed 1743351996
#
# Difference:
- "!TypeError: Function.prototype.apply was called on [object Object], which is a object and not a function"
+ "!TypeError: func.apply is not a function"
#
# Source file:
none
#
### Start of configuration x64,ignition:
"!TypeError: Function.prototype.apply was called on [object Object], which is a object and not a function"
"!TypeError: Function.prototype.apply was called on [object Object], which is a object and not a function"
### End of configuration x64,ignition
#
### Start of configuration x64,ignition_turbo:
"!TypeError: Function.prototype.apply was called on [object Object], which is a object and not a function"
"!TypeError: func.apply is not a function"
### End of configuration x64,ignition_turbo
,
Sep 10
TurboFan lowers this whole Function.prototype.apply() invocation to a CallWithArrayLike, which essentially boils down to an invocation of the CallFunction builtin. This produces the generic message "func.apply is not a function". The Function.prototype.apply builtin however produces a more sophisticated error message. The fix here is to probably only do the TurboFan optimization if we know that the receiver is actually callable (which we can get from the preceeding LOAD_IC). The same problem also affects the Function.prototype.call() inlining I guess. |
|||
►
Sign in to add a comment |
|||
Comment 1 by ClusterFuzz
, Sep 7Owner: machenb...@chromium.org
Status: Assigned (was: Untriaged)