This is an archive of the discontinued LLVM Phabricator instance.

Fix -DCOMPILER_RT_HWASAN_WITH_INTERCEPTORS=OFF regression
ClosedPublic

Authored by thurston on Aug 16 2023, 1:52 PM.

Details

Summary

This applies the fix as suggested by Gelbpunkt in https://github.com/llvm/llvm-project/issues/64730,

Thanks to Florian Mayer for pointing out that my earlier patch D151262
had caused this regression.

Diff Detail

Event Timeline

thurston created this revision.Aug 16 2023, 1:52 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 16 2023, 1:52 PM
Herald added a subscriber: Enna1. · View Herald Transcript
thurston requested review of this revision.Aug 16 2023, 1:52 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 16 2023, 1:52 PM
Herald added a subscriber: Restricted Project. · View Herald Transcript
fmayer added inline comments.Aug 16 2023, 1:54 PM
compiler-rt/lib/hwasan/hwasan_interceptors.cpp
523

I think we want to keep that as is, but move the InitializeCommonInterceptors into it (and add back the (void)(InitializeCommonInterceptors). Otherwise we will get the unused warnings that the voids are preventing

fmayer added inline comments.Aug 16 2023, 1:58 PM
compiler-rt/lib/hwasan/hwasan_interceptors.cpp
523

Maybe my wording isn't great. I meant

  (void)(InitializeCommonInterceptors);
  (void)(read_iovec);
  (void)(write_iovec);

#  if HWASAN_WITH_INTERCEPTORS
  InitializeCommonInterceptors();
  [...]
fmayer accepted this revision.Aug 16 2023, 2:07 PM
fmayer added inline comments.
compiler-rt/lib/hwasan/hwasan_interceptors.cpp
523

I should have properly read the error in the bug. My mistake. Nevermind me.

This revision is now accepted and ready to land.Aug 16 2023, 2:07 PM