This is an archive of the discontinued LLVM Phabricator instance.

[sanitizers] Remove the test case involving `new int[0]`
ClosedPublic

Authored by oontvoo on Nov 4 2020, 9:29 PM.

Details

Summary

Bionic doesn't acutally allocate any memory in this case, so there won't be a leak on Android.

Diff Detail

Event Timeline

oontvoo created this revision.Nov 4 2020, 9:29 PM
Herald added a project: Restricted Project. · View Herald TranscriptNov 4 2020, 9:29 PM
Herald added a subscriber: Restricted Project. · View Herald Transcript
oontvoo requested review of this revision.Nov 4 2020, 9:29 PM
vitalybuka added inline comments.Nov 4 2020, 11:22 PM
compiler-rt/test/asan/TestCases/leaks.cpp
25

other platform allocate stuff, so maybe just something here like this
if (ANDROID && n == 0) n = 1;

vitalybuka accepted this revision.Nov 4 2020, 11:36 PM

LGTM with the change

This revision is now accepted and ready to land.Nov 4 2020, 11:36 PM
oontvoo updated this revision to Diff 303103.Nov 5 2020, 6:16 AM
oontvoo marked an inline comment as done.

put back the //RUN and re-adjust n from 0 to 1 at runtime

This revision was landed with ongoing or failed builds.Nov 5 2020, 6:17 AM
This revision was automatically updated to reflect the committed changes.