Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception text appears in output in dartfuzz #36916

Closed
aartbik opened this issue May 9, 2019 · 1 comment

Comments

Projects
None yet
1 participant
@aartbik
Copy link
Contributor

commented May 9, 2019

The following output divergence:

KBC-CMP-ReleaseX64 - AOT-ReleaseX64: !DIVERGENCE! 1.12:180357858 (output=true)

seems due to subtle difference in the reported exception text. However, these strings should not be compared by dartfuzz in the first place. What is going on?

< RangeError (index): Invalid value: Not in range 0..2, inclusive: -10
---
> RangeError (length): Invalid value: Not in range 0..2, inclusive: -10

@aartbik aartbik self-assigned this May 9, 2019

@aartbik

This comment has been minimized.

Copy link
Contributor Author

commented May 9, 2019

This is actually hilarious. DartFuzz never introduces the catch (e) variable in its scope to avoid exactly situations like this. However, the math constant "const double e = 2.718281828459045" can be used by the fuzzer, causing an unintentional use of the exception parameter!

   catch (e) {
      .....
        var6 ??= var6;
        print(((foo2(fld0_3, 0.8970104855514572, ((!((var1 ? false : true))) ? Int32x4.wzxz : var2))).isNaN ? ((Map.from(Map.of(fld0_0))).isEmpty ? foo2({ 27 : '9En', 24 : 'Mt', 28 : '', 63 : '-Xycx5', 76 : '\u2665BB+B!' }, (0.5074121780321523 + var3), var5[var0]) : var3) : e));
       ....

dart-bot pushed a commit that referenced this issue May 9, 2019

[dart/fuzzer] rename exception parameter
Rationale:
catch (e) had a very interesting shadowing
with math's constant e, which unintentionally
allowed exeption text to enter the divergence
mechanism; here we were fuzzing the fuzzing
really :-)

#36916

Change-Id: Ie5cd61755ea61921b903684532d404f4dc734edd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/102062
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Aart Bik <ajcbik@google.com>

@aartbik aartbik closed this May 9, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.