This is an archive of the discontinued LLVM Phabricator instance.

[ASan] Fix asan_preload_test-2 on PowerPC64 Linux
ClosedPublic

Authored by foad on Dec 24 2014, 2:36 AM.

Details

Summary

This test failed because clang compiled the call to memset() into a
single sth instruction, instead of a call. Fix it by using write() instead
of memset().

Diff Detail

Event Timeline

foad updated this revision to Diff 17623.Dec 24 2014, 2:36 AM
foad retitled this revision from to [ASan] Fix asan_preload_test-2 on PowerPC64 Linux.
foad updated this object.
foad edited the test plan for this revision. (Show Details)
foad added reviewers: kcc, samsonov, garious, eugenis.
foad added a subscriber: Unknown Object (MLST).
eugenis edited edge metadata.Dec 24 2014, 3:06 AM

Would it work if you change memset to something that is unlikely to be optimized, like write(1, p, 2) ?

foad added a comment.Dec 24 2014, 3:13 AM

Would it work if you change memset to something that is unlikely to be optimized, like write(1, p, 2) ?

Yes, that works for me. But it'll write some nasty characters to stdout if the test fails.

foad updated this revision to Diff 17624.Dec 24 2014, 3:14 AM
foad edited edge metadata.

Use write instead of memset.

eugenis accepted this revision.Dec 24 2014, 3:16 AM
eugenis edited edge metadata.

Right. Either way is fine with me.

This revision is now accepted and ready to land.Dec 24 2014, 3:16 AM
foad updated this object.Dec 24 2014, 3:49 AM
foad edited edge metadata.
foad closed this revision.Dec 24 2014, 3:49 AM