[PATCH] D36190: [asan] Allocator support for Fuchsia
Roland McGrath via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 2 15:27:38 PDT 2017
mcgrathr added inline comments.
================
Comment at: lib/asan/asan_malloc_linux.cc:56
+#else
+ return UNLIKELY(asan_init_is_running);
+#endif
----------------
vitalybuka wrote:
> vitalybuka wrote:
> > mcgrathr wrote:
> > > vitalybuka wrote:
> > > > Why do you need to ifdef this?
> > > > I'd expect that asan_init_is_running will be false on fuchsia anyway
> > > It will always be false at runtime, but the compiler can't tell that statically.
> > > I want the dead code (and its static data bloat) to be compiled out, which it is with this.
> > could you please remove ifdef then? We don't like them only when no other options.
> > We can add them later if it cause real problems.
> actually just undo MaybeInDlsym change
It sounds like you want all the dead code and data bloat to be there.
It won't cause problems other than marginal slowdown and memory bloat.
But I don't see a good reason to leave it there when eliminating it is easy and noninvasive.
I have a new version where there is no #if but only a single if (constant) that will cause everything to be compiled away.
It required a semantic change to IsInDlsymAllocPool but one that is harmless and lets the compiler grok that it can compile it away.
https://reviews.llvm.org/D36190
More information about the llvm-commits
mailing list