This is an archive of the discontinued LLVM Phabricator instance.

Variable: Fix usage of uninitialised value
ClosedPublic

Authored by labath on Nov 28 2017, 7:14 AM.

Details

Summary

Variable::GetValuesForVariableExpressionPath was passing an
uninitialised value for the final_task_on_target argument. On my
compiler/optimization level combo, the final_task_on_target happened to
contain "dereference" in some circumstances, which produced hilarious
results. The same is true for other arguments to the
GetValueForExpressionPath call.

The correct behavior here seems to be to just omit the arguments
altogether and let the default behavior take place.

Diff Detail

Repository
rL LLVM

Event Timeline

labath created this revision.Nov 28 2017, 7:14 AM
labath added a comment.Dec 6 2017, 4:11 AM

Jim, could you have a quick look at this?

thanks.

jingham accepted this revision.Dec 6 2017, 11:18 AM

Sorry for the delay. That bug has been present since this function was added, so it doesn't look like there was a use for these parameters that got lost as the code evolved. So this seems like a fine change.

This revision is now accepted and ready to land.Dec 6 2017, 11:18 AM
This revision was automatically updated to reflect the committed changes.