skia2/resources/sksl/runtime_errors/Ossfuzz36655.rts
John Stiles e3f85e07fa Add improved regression test for oss-fuzz:36655.
Most of the code generated by the fuzzer is nonsense, but there is a
method to its madness. The crash is only triggered under specific
conditions:
- The runtime effect has enough helper functions to mostly fill up the
  call graph hash-map. It won't rehash until it gets close to capacity.
- There must be several calls to built-in functions, in order to add
  elements to the call graph to force a rehash.

The fuzzer-generated code manages to satisfy both these requirements.

Change-Id: I9a1d7535557fedd4e9bfece3930ac86ede291ffe
Bug: oss-fuzz:36655
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/437118
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2021-08-06 13:03:32 +00:00

50 lines
785 B
Plaintext

void m() {
;int x;+(2);;;;;;colorFilter;;;;;;;;
}
void n() {}
void Sn() {}
void S() {
;n();;;; m();;3;;;;;;;;;;;;;;;;;n();
}
void l() {
n();;;;;;;;;;m(),radians(2);S();
n();n();;;;;;;;;;atan;;;;;;;;;;;2;
}
void X() {
n() ;n();
Sn();;n() ;n();;;n();n();;n();l();n();S();
;n();m(),radians(1);X();
;0;;;l();n;;
}
void amsk_RTTAfjusti() {
(6).0ss;@if(acos(atan
(32/43/4-half3x3(5)[2].ttt+4/35).ss00*1752).s > 5)n();;0;n;n()
;
;float[992];
(5).0ss;@if(exp(
abs
(2).ss00*2147483648).s > 0)n();1;n;n()
;
;
;;
;;
;@if(asin(
052).s >=5)n();1;n;n
;
;;
;0;;;l();n;;
}
void amsk_Rfloat2x1i() {
(6).0ss;@if(acos(atan
(32/43/4-half3x3(5)[2].ttt+4/35).ss00*1752).s > 5)n();;1;n;n()
;
;;n()
;
;float[992];
(5).0ss;@if(exp(
abs
(2).ss00*7152).s > 0)n();1;n;n()
;
;
}