This is an archive of the discontinued LLVM Phabricator instance.

[analyzer] Handle case of undefined values in performTrivialCopy
ClosedPublic

Authored by ilya-palachev on Oct 18 2016, 7:09 AM.

Details

Summary

This patch fixes the assertion crash recently detected on some Tizen code. Since this code pattern is quite rare, it hasn't been handled yet. The patch extends the asserted statement so that to make it appropriate to possible undefined values.

Diff Detail

Repository
rL LLVM

Event Timeline

ilya-palachev retitled this revision from to Handle case of undefined values in performTrivialCopy.
ilya-palachev updated this object.
ilya-palachev set the repository for this revision to rL LLVM.
ilya-palachev retitled this revision from Handle case of undefined values in performTrivialCopy to [analyzer] Handle case of undefined values in performTrivialCopy.Oct 18 2016, 7:12 AM
NoQ accepted this revision.Oct 18 2016, 7:26 AM
NoQ edited edge metadata.

This seems correct. Loading from a garbage pointer should be modeled as garbage, and/or caught by a checker. performTrivialCopy is a high-level thingy that should be able to deal with any SVal input.

The checker's warning message looks really weird, hard to figure out where's the call here, s/Function/Operator/ could have been an improvement, but that's another story.

This revision is now accepted and ready to land.Oct 18 2016, 7:26 AM
This revision was automatically updated to reflect the committed changes.