Work around divide-by-zero UBSAN errors in intrinsic optimization.

If the SkSL program contains intrinsics that would divide by zero when
being optimized, the fuzzer would report this as undefined behavior.
Skia insists on IEEE semantics so this isn't a concern for us. We now
use `sk_ieee_double_divide` to work around these fuzzer issues.

Also note that the optimizer will discard results that are not finite,
so these infinite/NaN values are ephemeral anyway--they won't be used
in the final output. The intrinsic in the code will be left
as-is/unoptimized.

Change-Id: I747a434898a15b34716d95f6ca3d29fe4452005d
Bug: oss-fuzz:37850, oss-fuzz:37822, oss-fuzz:37761
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/443399
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
1 file changed