This is an archive of the discontinued LLVM Phabricator instance.

[Support] Fix bug in llvm::sys::argumentsFitWithinSystemLimits() of Unix/Program.inc
ClosedPublic

Authored by rafaelauler on Aug 25 2014, 12:56 PM.

Details

Reviewers
rafael
Summary

This patch fixes a subtle bug in the UNIX implementation of llvm::sys::argumentsFitWithinSystemLimits() regarding the misuse of a static variable. This bug causes our cached number that stores the system command line maximum length to be halved after each call to the function. With a sufficient number of calls to this function, it will eventually report any given command line string to be over system limits.

Diff Detail

Event Timeline

rafaelauler retitled this revision from to [Support] Fix bug in llvm::sys::argumentsFitWithinSystemLimits() of Unix/Program.inc .
rafaelauler updated this object.
rafaelauler edited the test plan for this revision. (Show Details)
rafaelauler added a reviewer: rafael.
rafaelauler added a subscriber: Unknown Object (MLST).
rafael accepted this revision.Aug 25 2014, 2:57 PM
rafael edited edge metadata.

LGTM.

This revision is now accepted and ready to land.Aug 25 2014, 2:57 PM

Thanks, could you please commit this?

rafaelauler edited edge metadata.

Fixed naming.