[PATCH] D40898: [Sanitizers] Basic sanitizer Solaris support (PR 33274)

Kostya Serebryany via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 6 09:57:15 PST 2017


kcc added a reviewer: alekseyshl.
kcc added a comment.

Too many #ifdefs in the code -- we can not let this in. 
Please find a way to reduce (to ~ zero) the number of #ifdefs inside the code. 
Prefer to have solaris-specific functionality in separate files.



================
Comment at: lib/sanitizer_common/sanitizer_common_interceptors.inc:4188
+      sz = sizeof(__sanitizer_shmid_ds);
+#if !SANITIZER_SOLARIS
+    else if (cmd == shmctl_shm_stat)
----------------
Here, above and below, please avoid #ifdefs inside the code. 
These are very bad. 
When possible, move the functionality to solaris-specific files. 


Repository:
  rCRT Compiler Runtime

https://reviews.llvm.org/D40898





More information about the llvm-commits mailing list