[PATCH] D104494: [dfsan] Replace dfs$ prefix with .dfsan suffix

George Balatsouras via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 17 17:40:29 PDT 2021


gbalats marked an inline comment as done.
gbalats added inline comments.


================
Comment at: llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp:1134
+      Asm.replace(Pos, 1, Suffix + "@");
+    }
     GV->getParent()->setModuleInlineAsm(Asm);
----------------
stephan.yichao.zhao wrote:
> Based on http://web.mit.edu/rhel-doc/3/rhel-as-en-3/symver.html, there must be a @ in the .symver line after the first match.
> Please change  Pos != std::string::npos to be like
> ```
> Pos = Asm.find("@", Pos);
> assert(Pos != std::string::npos);
> ```
Done. Used `report_fatal_error` instead of `assert` since this can be triggered by user input. Ideally, I think we should be using some recoverable error mechanism, but since we're not doing it elsewhere, I'm not going to introduce this with this change.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D104494/new/

https://reviews.llvm.org/D104494



More information about the llvm-commits mailing list