You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently FuzzIL's object literals and class definitions to not allow executing arbitrary expressions for property values and computed property names. Instead, these operations simply require an existing input:
While somewhat harder to read, this is semantically identical. However, there are cases where this behavior is observable, for example with a test case such as:
class X {
static i = 0;
static j = X.i + 1;
}
console.log(X);
Moreover, there have been bugs in the past where it was necessary to compute expressions inside class/object literals. While Fuzzilli is not the ideal fuzzer for such types of bugs, adding support for these features would still help find similar bugs in the future.
I think the proper way to support this would be by converting the single instructions into block instructions such as
let o = {
[Symbol.toPrimitive]: function() { ... },
};
This is adds a bit of bloat, but on the other hand is really flexible and allows us to perform any computation in these contexts. We already support lifting into a "single-expression" context so we can reuse all of that logic in the lifter, and so this change should mostly just affect the FuzzIL operations.
The text was updated successfully, but these errors were encountered:
This change adds some logic to allow object literals to be inlined if
they are "simple" (e.g. empty or just containing a few properties). This
is mostly just for aesthetical reasons. In the future, we should
consider allowing other expressions to be inlined into object literals,
but that will likely require changes to FuzzIL itself. See also
#490
Change-Id: Ic3cc8dfbcea660badb4f174739193873f0642946
Reviewed-on: https://chrome-internal-review.googlesource.com/c/v8/fuzzilli/+/7934466
Commit-Queue: Samuel Groß <[email protected]>
Reviewed-by: Carl Smith <[email protected]>
Currently FuzzIL's object literals and class definitions to not allow executing arbitrary expressions for property values and computed property names. Instead, these operations simply require an existing input:
As such, the values need to be computed first, and so during compilation, code such as
Becomes
While somewhat harder to read, this is semantically identical. However, there are cases where this behavior is observable, for example with a test case such as:
Moreover, there have been bugs in the past where it was necessary to compute expressions inside class/object literals. While Fuzzilli is not the ideal fuzzer for such types of bugs, adding support for these features would still help find similar bugs in the future.
I think the proper way to support this would be by converting the single instructions into block instructions such as
Which would then lift to
This is adds a bit of bloat, but on the other hand is really flexible and allows us to perform any computation in these contexts. We already support lifting into a "single-expression" context so we can reuse all of that logic in the lifter, and so this change should mostly just affect the FuzzIL operations.
The text was updated successfully, but these errors were encountered: