This is an archive of the discontinued LLVM Phabricator instance.

[Coverage] Fix use-after free in coverage emission
ClosedPublic

Authored by efriedma on Dec 18 2017, 5:35 PM.

Details

Summary

Fixes regression from r320533.

This fixes the undefined behavior, but I'm not sure it's really right... I think we end up with missing coverage for code in modules.

Diff Detail

Repository
rL LLVM

Event Timeline

efriedma created this revision.Dec 18 2017, 5:35 PM
vsk accepted this revision.Dec 18 2017, 5:43 PM

Thanks, this lgtm as a stopgap.

As I mentioned offline, I think the goal should be to have non-modules and modules-enabled builds of a project produce identical coverage reports. I'll look into what exactly we're adding to the deferred decls map while iterating over it, and see if we're dropping any coverage mappings.

This revision is now accepted and ready to land.Dec 18 2017, 5:43 PM
This revision was automatically updated to reflect the committed changes.