x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Memory corruption due to FSkeletalMeshMerge::GenerateLODModel writing out of bounds in certain cases

I was having memory corruption after running FSkeletalMeshMerge::DoMerge on certain mesh combinations (caused TBBMalloc to crash on random new allocations) so i ran the engine with the stomp debug allocator, now it reliably crashes here:

                 else
                 {
                     Section.DuplicatedVerticesBuffer.DupVertData = MergeSectionInfo.Section->DuplicatedVerticesBuffer.DupVertData;
                     Section.DuplicatedVerticesBuffer.DupVertIndexData = MergeSectionInfo.Section->DuplicatedVerticesBuffer.DupVertIndexData;
                     uint8* VertData = Section.DuplicatedVerticesBuffer.DupVertData.GetDataPointer();
                     for (uint32 i = 0; i < MergeSectionInfo.Section->NumVertices; ++i)
                     {
                         *((uint32*)(VertData + i * sizeof(uint32))) += CurrentBaseVertexIndex - MergeSectionInfo.Section->BaseVertexIndex;
                     }
                 }
                 Section.DuplicatedVerticesBuffer.bHasOverlappingVertices = true;

the problem is the VertData write out of bounds, i is 356 because it goes from 0 to NumVertices (391) however the array size is only 354 (since thats the size of DupVertData). There is some faulty logic here that determines that number of vertices, since DupVertIndexData is indeed sized 391, but DupVertData is not.

Product Version: UE 4.22
Tags:
more ▼

asked Jul 03 '19 at 04:43 AM in Bug Reports

avatar image

rajkosto
188 24 31 145

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Sigh...

This was fixed in https://github.com/EpicGames/UnrealEngine/commit/3c281c4ca5289802b741050f81117b88a52868ee#diff-4307661913a7b8476f50603ebd8eb3e1 It just never made it into release.

Always good when master is MORE STABLE than release.

more ▼

answered Jul 03 '19 at 04:55 AM

avatar image

rajkosto
188 24 31 145

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question