This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug sanitizer/83388] reference statement index not found error with -fsanitize=null
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 14 Dec 2017 14:31:06 +0000
- Subject: [Bug sanitizer/83388] reference statement index not found error with -fsanitize=null
- Auto-submitted: auto-generated
- References: <bug-83388-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83388
--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to Jan Hubicka from comment #7)
> I believe we do not stream any references to references and once we start to
> do we will need to invent machinery to keep them intact like we have for
> edges and symbols. So I would go for removal of the refernece.
>
> I however wonder if this is the best place to remove statements from
> function. I would expect either fixup_cfg or one of the IPA transform stages
> to be responsible for this instead.
So where exactly? Ideally in something that has to walk the whole IL again.
> Why flag_sanitize is not optimization and not streamed along with function
> bodies? It seems to make sense to mix sanitized and unsanitized units.
We've tried that (merging options on lto reads) and it just didn't work and was
a complete nightmare.
There are many different sanitizers, and they are discovered and lowered and
handled at different stages (FEs, gimplifier, ubsan pass, asan pass, tsan pass,
sanopt pass, ...).