Page MenuHome

A Patch to Address Task T77106
ClosedPublic

Authored by Garry R. Osgood (grosgood) on May 31 2020, 2:05 AM.

Details

Summary

Problem
Callers to intern/cycles/kernel/bvh/bvh.h:scene_intersect_local() do not always supply a LocalIntersection *local_isect pointer, and over time NULL pointer sanity checks have been wrapped around this pointer wherever it appears, most recently via rBca72ff599a96b64e by @Brecht Van Lommel (brecht).

Patch
This patch follows the lead of the cited patch and similary wraps a sanity check around local_isect at line 326 There are curious facets in the blend file furnished by the task's reporter, @Voldemars Pauls Dzenis (lynxon), which give rise to the caller's Ray object containing NaN's, which induces scene_intersect_valid(ray) to return false, a fairly rare combination of events. I surmise that this is why the unwrapped, unchecked pointer has gone unnoticed for awhile.

Details
See T77106.

Diff Detail

Repository
rB Blender

Event Timeline

Garry R. Osgood (grosgood) requested review of this revision.May 31 2020, 2:05 AM
Garry R. Osgood (grosgood) created this revision.
Richard Antalik (ISS) resigned from this revision.Jun 1 2020, 3:57 AM

I would say LGTM, with context provided I would assume it would be safe to accept, but otherwise I have no idea what I am looking at - not my area :)

This revision is now accepted and ready to land.Jun 2 2020, 5:50 AM