This is an archive of the discontinued LLVM Phabricator instance.

[03/10] [COFF] Fix error handling in ResourceSectionRef
ClosedPublic

Authored by mstorsjo on Aug 27 2019, 12:03 PM.

Details

Summary

Previously, the expression (Reader.readFoo()) was expanded twice, triggering asserts as one of the Error types ends up not checked (and as it was expanded twice, the method would end up called twice if it failed first).

Do we need a test with an intentionally broken object file to test this?

Diff Detail

Event Timeline

mstorsjo created this revision.Aug 27 2019, 12:03 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 27 2019, 12:03 PM
Herald added a subscriber: hiraditya. · View Herald Transcript
rnk accepted this revision.Aug 27 2019, 12:57 PM

lgtm I don't think it needs a test.

This revision is now accepted and ready to land.Aug 27 2019, 12:57 PM
This revision was automatically updated to reflect the committed changes.