This is an archive of the discontinued LLVM Phabricator instance.

[LSAN] Fix test swapcontext.cc on MIPS
ClosedPublic

Authored by slthakur on May 5 2016, 3:25 AM.

Details

Summary

There is no frame validity check in the slow unwinder like there is in the fast unwinder due to which lsan reports a leak even for heap allocated coroutine in the test swapcontext.cc. Since mips/linux uses slow unwindwer instead of fast unwinder, the test fails for mips/linux. Therefore adding the checks before unwinding fixes the test for mips/linux.

Continued from http://reviews.llvm.org/D18690.

Diff Detail

Repository
rL LLVM

Event Timeline

slthakur updated this revision to Diff 56256.May 5 2016, 3:25 AM
slthakur retitled this revision from to [LSAN] Fix test swapcontext.cc on MIPS.
slthakur updated this object.
slthakur added reviewers: kcc, samsonov, earthdok.
slthakur set the repository for this revision to rL LLVM.
slthakur added a project: Restricted Project.

Gentle reminder

aizatsky added inline comments.
lib/lsan/lsan.h
18

We try to stay away from platform ifdefs where possible. Especially here, where new define follows the other one almost to the letter.

I suggest you find a way to achieve this without platform ifdefs. (e.g. function differently defined in platform-specific files).

slthakur updated this revision to Diff 57437.May 16 2016, 11:48 PM

As suggested by Mike, updated patch to avoid platform ifdefs.

slthakur updated this revision to Diff 57441.May 17 2016, 12:19 AM

Changed clause for if statement.

aizatsky accepted this revision.May 17 2016, 12:03 PM
aizatsky added a reviewer: aizatsky.
This revision is now accepted and ready to land.May 17 2016, 12:03 PM
slthakur closed this revision.May 17 2016, 11:16 PM

Committed in revision 269882

slthakur edited edge metadata.May 22 2016, 11:20 PM
slthakur added a subscriber: tstellarAMD.

Hi,

Is it okay to merge this patch to 3.8.1 ?