[PATCH] D148573: Allow -fsanitize=function on all targets
    Fangrui Song via Phabricator via cfe-commits 
    cfe-commits at lists.llvm.org
       
    Mon May 22 10:40:45 PDT 2023
    
    
  
MaskRay added a comment.
In D148573#4361396 <https://reviews.llvm.org/D148573#4361396>, @sbc100 wrote:
> This change seems to be causing problems on the emscripten auto-roller:  https://ci.chromium.org/ui/p/emscripten-releases/builders/try/linux/b8780394114149321217/overview
>
> Failures show up in ubsan tests and look like this:
>
>   error: symbol '_Z4testi' unsupported subtraction expression used in relocation in code section.
>   error: symbol '__main_argc_argv' unsupported subtraction expression used in relocation in code section.
>   fatal error: error in backend: function sections must contain one function each
>
> It seems like enabling this sanitizer perhaps uses features we don't yet support?  I will keep investigating but perhaps we can find a way to revert he effect on the wasm backend for now?
wasm seems to use `-fsanitize=undefined`, which includes `-fsanitize=function`.
wasm doesn't allow data words before the function entry, so we need to unsupport `-fsanitize=function` for wasm...
Repository:
  rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D148573/new/
https://reviews.llvm.org/D148573
    
    
More information about the cfe-commits
mailing list