From c01388fb0b639172f0c0f29f80dd01646fc1b89c Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Wed, 6 Jul 2022 21:10:22 +0300 Subject: SL-16793 Crash at LLProfile::addHole addHole can be accessed from main tread and from mesh thread, safeguard pt --- indra/llmath/llvolume.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llmath') diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp index 5099920f32..47c4977afd 100644 --- a/indra/llmath/llvolume.cpp +++ b/indra/llmath/llvolume.cpp @@ -683,7 +683,7 @@ LLProfile::Face* LLProfile::addHole(const LLProfileParams& params, BOOL flat, F3 Face *face = addFace(mTotalOut, mTotal-mTotalOut,0,LL_FACE_INNER_SIDE, flat); - static LLAlignedArray pt; + static thread_local LLAlignedArray pt; pt.resize(mTotal) ; for (S32 i=mTotalOut;i Date: Thu, 7 Jul 2022 00:01:33 +0300 Subject: SL-16793 Potential crash at createSide --- indra/llmath/llvolume.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llmath') diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp index 47c4977afd..2b23325bff 100644 --- a/indra/llmath/llvolume.cpp +++ b/indra/llmath/llvolume.cpp @@ -6821,7 +6821,7 @@ BOOL LLVolumeFace::createSide(LLVolume* volume, BOOL partial_build) LLVector4a* norm = mNormals; - static LLAlignedArray triangle_normals; + static thread_local LLAlignedArray triangle_normals; try { triangle_normals.resize(count); -- cgit v1.2.3 From 09400b74ad79c468ca207005a6ca6621fa845f5d Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Thu, 4 Aug 2022 22:14:08 +0300 Subject: SL-17902 Crash at LLAlignedArray, out of bounds --- indra/llmath/llvolume.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'indra/llmath') diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp index c27b144f19..93f1d508f3 100644 --- a/indra/llmath/llvolume.cpp +++ b/indra/llmath/llvolume.cpp @@ -6674,13 +6674,19 @@ BOOL LLVolumeFace::createSide(LLVolume* volume, BOOL partial_build) else { // Get s value for tex-coord. - if (!flat) + S32 index = mBeginS + s; + if (index >= profile.size()) + { + // edge? + ss = flat ? 1.f - begin_stex : 1.f; + } + else if (!flat) { - ss = profile[mBeginS + s][2]; + ss = profile[index][2]; } else { - ss = profile[mBeginS + s][2] - begin_stex; + ss = profile[index][2] - begin_stex; } } -- cgit v1.2.3