This is an archive of the discontinued LLVM Phabricator instance.

Fix bug in SanitizerCommon.StartSubprocessTest causing flaky behavior.
ClosedPublic

Authored by zansari on Feb 12 2016, 4:12 PM.

Details

Summary

The tests

SanitizerCommon-Unit :: Sanitizer-i386-Test/SanitizerCommon.StartSubprocessTest
SanitizerCommon-Unit :: Sanitizer-x86_64-Test/SanitizerCommon.StartSubprocessTest

can randomly fail depending on stack layout and random bits on the stack.
This is due to a string of arrays not being properly NULL terminated before being passed to "execv". From the docs:

"The execv(), execvp(), and execvpe() functions provide an array of pointers to null-terminated strings that represent the argument list available to the new program. The first argument, by convention, should point to the filename associated with the file being executed. The array of pointers must be terminated by a NULL pointer."

Diff Detail

Repository
rL LLVM

Event Timeline

zansari updated this revision to Diff 47873.Feb 12 2016, 4:12 PM
zansari retitled this revision from to Fix bug in SanitizerCommon.StartSubprocessTest causing flaky behavior..
zansari updated this object.
zansari added reviewers: aizatsky, samsonov, earthdok.
zansari added a subscriber: llvm-commits.
kcc accepted this revision.Feb 12 2016, 4:22 PM
kcc added a reviewer: kcc.
kcc added a subscriber: kcc.

LGTM, thanks!

This revision is now accepted and ready to land.Feb 12 2016, 4:22 PM
This revision was automatically updated to reflect the committed changes.