This is an archive of the discontinued LLVM Phabricator instance.

[llvm-debuginfo-analyzer] (07/09) - Compare elements - Test case (AddressSanitizer: leaked in allocations)
ClosedPublic

Authored by CarlosAlbertoEnciso on Oct 24 2022, 4:40 AM.

Details

Summary

The test case 'CompareElements' caused a failure in:

https://lab.llvm.org/buildbot#builders/5/builds/28502
https://lab.llvm.org/buildbot#builders/168/builds/9671
SUMMARY: AddressSanitizer: 2144 byte(s) leaked in 14 allocation(s).

The Insert function conditionally adds the Child logical
element to a logical scope. The not added logical elements,
caused the memory leak. Just record them to be destroyed
when the logical reader is destroyed.

Changed EXPECT_NE with ASSERT_NE.
Missing in the main review.

Diff Detail

Event Timeline

CarlosAlbertoEnciso requested review of this revision.Oct 24 2022, 4:40 AM

As this issue was causing build faiures in:

https://lab.llvm.org/buildbot#builders/5/builds/28502
https://lab.llvm.org/buildbot#builders/168/builds/9671

The same issues were reported and the patch discussed with @kda.
I landed the patch as https://github.com/llvm/llvm-project/commit/cddea67663655591b3d650d81d6546abbdc50ae5

After that commit the above bots build successful.

jryans accepted this revision.Oct 26 2022, 6:46 AM

Seems like a reasonable fix, and it makes sense that you landed it quickly to fix the build issues. Thanks! 🙂

This revision is now accepted and ready to land.Oct 26 2022, 6:46 AM

Seems like a reasonable fix, and it makes sense that you landed it quickly to fix the build issues. Thanks! 🙂

@jryans Thanks very much for your review.