about summary refs log tree commit diff homepage
path: root/runtime
diff options
context:
space:
mode:
authorPavel <operasfantom@gmail.com>2022-08-06 16:48:04 +0400
committerCristian Cadar <c.cadar@imperial.ac.uk>2022-09-14 20:40:10 +0100
commite244b610b04afd81ef3ae47b3644fecc41ea4db1 (patch)
treebd51da091955ac47631cbe81e4d55316f37a3045 /runtime
parent13564199937f2382ae3b0f585e4b876449e6d5c9 (diff)
downloadklee-e244b610b04afd81ef3ae47b3644fecc41ea4db1.tar.gz
Add notes about how to keep in sync runtime with LLVM project
Diffstat (limited to 'runtime')
-rw-r--r--runtime/Sanitizer/sanitizer_common/sanitizer_common.h6
-rw-r--r--runtime/Sanitizer/sanitizer_common/sanitizer_internal_defs.h5
-rw-r--r--runtime/Sanitizer/sanitizer_common/sanitizer_platform.h4
-rw-r--r--runtime/Sanitizer/ubsan/ubsan_checks.inc5
-rw-r--r--runtime/Sanitizer/ubsan/ubsan_diag.h6
-rw-r--r--runtime/Sanitizer/ubsan/ubsan_handlers.cpp3
-rw-r--r--runtime/Sanitizer/ubsan/ubsan_handlers.h4
-rw-r--r--runtime/Sanitizer/ubsan/ubsan_value.h6
8 files changed, 39 insertions, 0 deletions
diff --git a/runtime/Sanitizer/sanitizer_common/sanitizer_common.h b/runtime/Sanitizer/sanitizer_common/sanitizer_common.h
index ebb88600..7c1161f7 100644
--- a/runtime/Sanitizer/sanitizer_common/sanitizer_common.h
+++ b/runtime/Sanitizer/sanitizer_common/sanitizer_common.h
@@ -12,6 +12,12 @@
 // Implementation of some functions are provided in sanitizer_common, while
 // others must be defined by run-time library itself.
 //===----------------------------------------------------------------------===//
+
+// NOTE: Needs to be kept in sync with
+// compiler-rt/lib/sanitizer_common/sanitizer_common.h from LLVM project.
+// But in fact, nothing was used form that header, so leave it as a wrapper for
+// used internal headers.
+
 #ifndef SANITIZER_COMMON_H
 #define SANITIZER_COMMON_H
 
diff --git a/runtime/Sanitizer/sanitizer_common/sanitizer_internal_defs.h b/runtime/Sanitizer/sanitizer_common/sanitizer_internal_defs.h
index d0817abe..a8ba685a 100644
--- a/runtime/Sanitizer/sanitizer_common/sanitizer_internal_defs.h
+++ b/runtime/Sanitizer/sanitizer_common/sanitizer_internal_defs.h
@@ -9,6 +9,11 @@
 // This file is shared between AddressSanitizer and ThreadSanitizer.
 // It contains macro used in run-time libraries code.
 //===----------------------------------------------------------------------===//
+
+// NOTE: Needs to be kept in sync with
+// compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h from LLVM project.
+// But in fact, only typedefs for basic types were used, this is how it is.
+
 #ifndef SANITIZER_DEFS_H
 #define SANITIZER_DEFS_H
 
diff --git a/runtime/Sanitizer/sanitizer_common/sanitizer_platform.h b/runtime/Sanitizer/sanitizer_common/sanitizer_platform.h
index 074d2b74..d912a0f0 100644
--- a/runtime/Sanitizer/sanitizer_common/sanitizer_platform.h
+++ b/runtime/Sanitizer/sanitizer_common/sanitizer_platform.h
@@ -9,6 +9,10 @@
 // Common platform macros.
 //===----------------------------------------------------------------------===//
 
+// NOTE: Needs to be kept in sync with
+// compiler-rt/lib/sanitizer_common/sanitizer_platform.h from LLVM project.
+// But in fact, only SANITIZER_WORDSIZE macro was used, so how it is.
+
 #ifndef SANITIZER_PLATFORM_H
 #define SANITIZER_PLATFORM_H
 
diff --git a/runtime/Sanitizer/ubsan/ubsan_checks.inc b/runtime/Sanitizer/ubsan/ubsan_checks.inc
index a4235e96..35c64f41 100644
--- a/runtime/Sanitizer/ubsan/ubsan_checks.inc
+++ b/runtime/Sanitizer/ubsan/ubsan_checks.inc
@@ -10,6 +10,11 @@
 //
 //===----------------------------------------------------------------------===//
 
+// NOTE: Needs to be kept in sync with compiler-rt/lib/ubsan/ubsan_checks.inc
+// from LLVM project.
+// Especially new ErrorType to `get_suffix` function from ubsan_handlers.cpp and
+// corresponding tests to test\Feature\ubsan directory should be added.
+
 #include "klee/Config/Version.h"
 
 #ifndef UBSAN_CHECK
diff --git a/runtime/Sanitizer/ubsan/ubsan_diag.h b/runtime/Sanitizer/ubsan/ubsan_diag.h
index 4bb0404a..29e92ea1 100644
--- a/runtime/Sanitizer/ubsan/ubsan_diag.h
+++ b/runtime/Sanitizer/ubsan/ubsan_diag.h
@@ -9,6 +9,12 @@
 // Diagnostics emission for Clang's undefined behavior sanitizer.
 //
 //===----------------------------------------------------------------------===//
+
+// NOTE: Needs to be kept in sync with compiler-rt/lib/ubsan/ubsan_diag.h
+// from LLVM project.
+// But in fact, only TypeName in TypeDescriptor and ErrorType commonly were used,
+// so how it is.
+
 #ifndef UBSAN_DIAG_H
 #define UBSAN_DIAG_H
 
diff --git a/runtime/Sanitizer/ubsan/ubsan_handlers.cpp b/runtime/Sanitizer/ubsan/ubsan_handlers.cpp
index 38f3425f..0213836b 100644
--- a/runtime/Sanitizer/ubsan/ubsan_handlers.cpp
+++ b/runtime/Sanitizer/ubsan/ubsan_handlers.cpp
@@ -10,6 +10,9 @@
 //
 //===----------------------------------------------------------------------===//
 
+// NOTE: Needs to be kept in sync with compiler-rt/lib/ubsan/ubsan_handlers.cpp
+// from LLVM project.
+
 #include "ubsan_handlers.h"
 #include "ubsan_diag.h"
 
diff --git a/runtime/Sanitizer/ubsan/ubsan_handlers.h b/runtime/Sanitizer/ubsan/ubsan_handlers.h
index f6c36fe5..93d63265 100644
--- a/runtime/Sanitizer/ubsan/ubsan_handlers.h
+++ b/runtime/Sanitizer/ubsan/ubsan_handlers.h
@@ -9,6 +9,10 @@
 // Entry points to the runtime library for Clang's undefined behavior sanitizer.
 //
 //===----------------------------------------------------------------------===//
+
+// NOTE: Needs to be kept in sync with compiler-rt/lib/ubsan/ubsan_handlers.h
+// from LLVM project.
+
 #ifndef UBSAN_HANDLERS_H
 #define UBSAN_HANDLERS_H
 
diff --git a/runtime/Sanitizer/ubsan/ubsan_value.h b/runtime/Sanitizer/ubsan/ubsan_value.h
index 5474961e..02f1adf6 100644
--- a/runtime/Sanitizer/ubsan/ubsan_value.h
+++ b/runtime/Sanitizer/ubsan/ubsan_value.h
@@ -10,6 +10,12 @@
 // the ubsan runtime.
 //
 //===----------------------------------------------------------------------===//
+
+// NOTE: Needs to be kept in sync with compiler-rt/lib/ubsan/ubsan_value.h
+// from LLVM project.
+// But in fact, only subset of TypeDescriptor was used and SourceLocation left
+// for later work on specifying location in ubsan_handlers.cpp, so how it is.
+
 #ifndef UBSAN_VALUE_H
 #define UBSAN_VALUE_H