This is an archive of the discontinued LLVM Phabricator instance.

[BitcodeReader] Check if we can create a null constant for type.
ClosedPublic

Authored by fhahn on Aug 7 2019, 12:38 PM.

Details

Summary

We cannot create null constants for certain types, e.g. VoidTy,
FunctionTy or LabelTy. getNullValue asserts if we pass in an
unsupported type. We should also check for opaque types, but I'm not
sure how.

This fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=14795.

Diff Detail

Repository
rL LLVM

Event Timeline

fhahn created this revision.Aug 7 2019, 12:38 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 7 2019, 12:38 PM
vsk accepted this revision.Aug 21 2019, 10:21 AM
vsk added a subscriber: vsk.

LGTM.

This revision is now accepted and ready to land.Aug 21 2019, 10:21 AM
This revision was automatically updated to reflect the committed changes.