Variable: Fix usage of uninitialised value
ClosedPublic

Authored by labath on Tue, Nov 28, 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
labath created this revision.Tue, Nov 28, 7:14 AM
labath added a comment.Wed, Dec 6, 4:11 AM

Jim, could you have a quick look at this?

thanks.

jingham accepted this revision.Wed, Dec 6, 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.Wed, Dec 6, 11:18 AM
This revision was automatically updated to reflect the committed changes.