Merge pull request #14087 from sethalves/quiet-asan

fix several uninitialized reads
This commit is contained in:
John Conklin II 2018-10-01 16:48:54 -07:00 committed by GitHub
commit 3ab83731b9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 7 deletions

View file

@ -996,7 +996,6 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo
_enableProcessOctreeThread(true),
_lastNackTime(usecTimestampNow()),
_lastSendDownstreamAudioStats(usecTimestampNow()),
_aboutToQuit(false),
_notifiedPacketVersionMismatchThisDomain(false),
_maxOctreePPS(maxOctreePacketsPerSecond.get()),
_lastFaceTrackerUpdate(0),

View file

@ -560,6 +560,8 @@ private:
MainWindow* _window;
QElapsedTimer& _sessionRunTimer;
bool _aboutToQuit { false };
bool _previousSessionCrashed;
DisplayPluginPointer _displayPlugin;
@ -651,8 +653,6 @@ private:
quint64 _lastNackTime;
quint64 _lastSendDownstreamAudioStats;
bool _aboutToQuit;
bool _notifiedPacketVersionMismatchThisDomain;
ConditionalGuard _settingsGuard;

View file

@ -145,7 +145,7 @@ EntityItemID EntityTreeElement::findRayIntersection(const glm::vec3& origin, con
bool visibleOnly, bool collidableOnly, QVariantMap& extraInfo, bool precisionPicking) {
EntityItemID result;
BoxFace localFace;
BoxFace localFace { UNKNOWN_FACE };
glm::vec3 localSurfaceNormal;
if (!canPickIntersect()) {
@ -213,7 +213,7 @@ EntityItemID EntityTreeElement::findDetailedRayIntersection(const glm::vec3& ori
// we can use the AABox's ray intersection by mapping our origin and direction into the entity frame
// and testing intersection there.
float localDistance;
BoxFace localFace;
BoxFace localFace { UNKNOWN_FACE };
glm::vec3 localSurfaceNormal;
if (entityFrameBox.findRayIntersection(entityFrameOrigin, entityFrameDirection, 1.0f / entityFrameDirection, localDistance,
localFace, localSurfaceNormal)) {

View file

@ -248,7 +248,7 @@ bool TriangleSet::TriangleTreeCell::findRayIntersection(const glm::vec3& origin,
// The distance passed in here is the distance to our bounding box. If !precision, that distance is used
{
float internalDistance = distance;
BoxFace internalFace;
BoxFace internalFace { UNKNOWN_FACE };
Triangle internalTriangle;
if (findRayIntersectionInternal(origin, direction, internalDistance, internalFace, internalTriangle, precision, trianglesTouched, allowBackface)) {
bestLocalDistance = internalDistance;
@ -472,4 +472,4 @@ bool TriangleSet::TriangleTreeCell::findParabolaIntersection(const glm::vec3& or
triangle = bestLocalTriangle;
}
return intersects;
}
}