This is an archive of the discontinued LLVM Phabricator instance.

[NewPM][Sancov] Create the Sancov Pass after building the pipelines
ClosedPublic

Authored by leonardchan on Sep 7 2019, 7:19 PM.

Details

Summary

We're running into linker errors from missing sancov sections:

ld.lld: error: relocation refers to a discarded section: __sancov_guards
>>> defined in user-arm64-ubsan-sancov-full.shlib/obj/third_party/ulib/scudo/scudo.wrappers_c.cc.o
>>> referenced by common.h:26 (../../zircon/third_party/ulib/scudo/common.h:26)
... many other references

I believe this is due to a pass in the default pipeline that somehow discards these sections. The ModuleSanitizerCoveragePass was initially added at the start f the pipeline. This now adds it to the end of the pipeline for optimized and unoptimized builds.

Diff Detail

Repository
rL LLVM

Event Timeline

leonardchan created this revision.Sep 7 2019, 7:19 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 7 2019, 7:19 PM
chandlerc accepted this revision.Sep 7 2019, 9:54 PM

LGTM to fix folks broken by this.

That said, we should look for a way to test this in a follow up patch

This revision is now accepted and ready to land.Sep 7 2019, 9:54 PM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptSep 8 2019, 12:29 AM