xcodebuild-helper 1.1.1 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (204) hide show
  1. checksums.yaml +4 -4
  2. metadata +4 -220
  3. data/.codeclimate.yml +0 -20
  4. data/.gitignore +0 -1
  5. data/.rspec +0 -2
  6. data/.travis.yml +0 -7
  7. data/Gemfile +0 -6
  8. data/Gemfile.lock +0 -114
  9. data/Guardfile +0 -18
  10. data/README.md +0 -7
  11. data/Rakefile +0 -7
  12. data/assets/style.css +0 -110
  13. data/bin/oclint +0 -5
  14. data/bin/oclint-0.8 +0 -5
  15. data/bin/oclint-json-compilation-database +0 -5
  16. data/bin/oclint-xcodebuild +0 -5
  17. data/externals/oclint/LICENSE +0 -69
  18. data/externals/oclint/bin/oclint +0 -0
  19. data/externals/oclint/bin/oclint-0.10.2 +0 -0
  20. data/externals/oclint/bin/oclint-json-compilation-database +0 -88
  21. data/externals/oclint/bin/oclint-xcodebuild +0 -218
  22. data/externals/oclint/lib/clang/3.7.0/asan_blacklist.txt +0 -13
  23. data/externals/oclint/lib/clang/3.7.0/include/Intrin.h +0 -958
  24. data/externals/oclint/lib/clang/3.7.0/include/__stddef_max_align_t.h +0 -43
  25. data/externals/oclint/lib/clang/3.7.0/include/__wmmintrin_aes.h +0 -72
  26. data/externals/oclint/lib/clang/3.7.0/include/__wmmintrin_pclmul.h +0 -34
  27. data/externals/oclint/lib/clang/3.7.0/include/adxintrin.h +0 -88
  28. data/externals/oclint/lib/clang/3.7.0/include/altivec.h +0 -13528
  29. data/externals/oclint/lib/clang/3.7.0/include/ammintrin.h +0 -215
  30. data/externals/oclint/lib/clang/3.7.0/include/arm_acle.h +0 -304
  31. data/externals/oclint/lib/clang/3.7.0/include/arm_neon.h +0 -68419
  32. data/externals/oclint/lib/clang/3.7.0/include/avx2intrin.h +0 -1256
  33. data/externals/oclint/lib/clang/3.7.0/include/avx512bwintrin.h +0 -1250
  34. data/externals/oclint/lib/clang/3.7.0/include/avx512cdintrin.h +0 -131
  35. data/externals/oclint/lib/clang/3.7.0/include/avx512dqintrin.h +0 -242
  36. data/externals/oclint/lib/clang/3.7.0/include/avx512erintrin.h +0 -285
  37. data/externals/oclint/lib/clang/3.7.0/include/avx512fintrin.h +0 -2457
  38. data/externals/oclint/lib/clang/3.7.0/include/avx512vlbwintrin.h +0 -1907
  39. data/externals/oclint/lib/clang/3.7.0/include/avx512vldqintrin.h +0 -353
  40. data/externals/oclint/lib/clang/3.7.0/include/avx512vlintrin.h +0 -1982
  41. data/externals/oclint/lib/clang/3.7.0/include/avxintrin.h +0 -1308
  42. data/externals/oclint/lib/clang/3.7.0/include/bmi2intrin.h +0 -99
  43. data/externals/oclint/lib/clang/3.7.0/include/bmiintrin.h +0 -153
  44. data/externals/oclint/lib/clang/3.7.0/include/cpuid.h +0 -209
  45. data/externals/oclint/lib/clang/3.7.0/include/cuda_builtin_vars.h +0 -110
  46. data/externals/oclint/lib/clang/3.7.0/include/emmintrin.h +0 -1480
  47. data/externals/oclint/lib/clang/3.7.0/include/f16cintrin.h +0 -63
  48. data/externals/oclint/lib/clang/3.7.0/include/float.h +0 -124
  49. data/externals/oclint/lib/clang/3.7.0/include/fma4intrin.h +0 -236
  50. data/externals/oclint/lib/clang/3.7.0/include/fmaintrin.h +0 -234
  51. data/externals/oclint/lib/clang/3.7.0/include/fxsrintrin.h +0 -55
  52. data/externals/oclint/lib/clang/3.7.0/include/htmintrin.h +0 -226
  53. data/externals/oclint/lib/clang/3.7.0/include/htmxlintrin.h +0 -363
  54. data/externals/oclint/lib/clang/3.7.0/include/ia32intrin.h +0 -101
  55. data/externals/oclint/lib/clang/3.7.0/include/immintrin.h +0 -203
  56. data/externals/oclint/lib/clang/3.7.0/include/inttypes.h +0 -102
  57. data/externals/oclint/lib/clang/3.7.0/include/iso646.h +0 -43
  58. data/externals/oclint/lib/clang/3.7.0/include/limits.h +0 -118
  59. data/externals/oclint/lib/clang/3.7.0/include/lzcntintrin.h +0 -72
  60. data/externals/oclint/lib/clang/3.7.0/include/mm3dnow.h +0 -167
  61. data/externals/oclint/lib/clang/3.7.0/include/mm_malloc.h +0 -75
  62. data/externals/oclint/lib/clang/3.7.0/include/mmintrin.h +0 -507
  63. data/externals/oclint/lib/clang/3.7.0/include/module.modulemap +0 -196
  64. data/externals/oclint/lib/clang/3.7.0/include/nmmintrin.h +0 -35
  65. data/externals/oclint/lib/clang/3.7.0/include/pmmintrin.h +0 -122
  66. data/externals/oclint/lib/clang/3.7.0/include/popcntintrin.h +0 -50
  67. data/externals/oclint/lib/clang/3.7.0/include/prfchwintrin.h +0 -39
  68. data/externals/oclint/lib/clang/3.7.0/include/rdseedintrin.h +0 -59
  69. data/externals/oclint/lib/clang/3.7.0/include/rtmintrin.h +0 -59
  70. data/externals/oclint/lib/clang/3.7.0/include/s390intrin.h +0 -39
  71. data/externals/oclint/lib/clang/3.7.0/include/sanitizer/allocator_interface.h +0 -66
  72. data/externals/oclint/lib/clang/3.7.0/include/sanitizer/asan_interface.h +0 -155
  73. data/externals/oclint/lib/clang/3.7.0/include/sanitizer/common_interface_defs.h +0 -118
  74. data/externals/oclint/lib/clang/3.7.0/include/sanitizer/coverage_interface.h +0 -63
  75. data/externals/oclint/lib/clang/3.7.0/include/sanitizer/dfsan_interface.h +0 -114
  76. data/externals/oclint/lib/clang/3.7.0/include/sanitizer/linux_syscall_hooks.h +0 -3070
  77. data/externals/oclint/lib/clang/3.7.0/include/sanitizer/lsan_interface.h +0 -84
  78. data/externals/oclint/lib/clang/3.7.0/include/sanitizer/msan_interface.h +0 -107
  79. data/externals/oclint/lib/clang/3.7.0/include/sanitizer/tsan_interface_atomic.h +0 -222
  80. data/externals/oclint/lib/clang/3.7.0/include/shaintrin.h +0 -79
  81. data/externals/oclint/lib/clang/3.7.0/include/smmintrin.h +0 -487
  82. data/externals/oclint/lib/clang/3.7.0/include/stdalign.h +0 -35
  83. data/externals/oclint/lib/clang/3.7.0/include/stdarg.h +0 -52
  84. data/externals/oclint/lib/clang/3.7.0/include/stdatomic.h +0 -190
  85. data/externals/oclint/lib/clang/3.7.0/include/stdbool.h +0 -44
  86. data/externals/oclint/lib/clang/3.7.0/include/stddef.h +0 -137
  87. data/externals/oclint/lib/clang/3.7.0/include/stdint.h +0 -707
  88. data/externals/oclint/lib/clang/3.7.0/include/stdnoreturn.h +0 -30
  89. data/externals/oclint/lib/clang/3.7.0/include/tbmintrin.h +0 -154
  90. data/externals/oclint/lib/clang/3.7.0/include/tgmath.h +0 -1374
  91. data/externals/oclint/lib/clang/3.7.0/include/tmmintrin.h +0 -230
  92. data/externals/oclint/lib/clang/3.7.0/include/unwind.h +0 -282
  93. data/externals/oclint/lib/clang/3.7.0/include/vadefs.h +0 -65
  94. data/externals/oclint/lib/clang/3.7.0/include/varargs.h +0 -26
  95. data/externals/oclint/lib/clang/3.7.0/include/vecintrin.h +0 -8946
  96. data/externals/oclint/lib/clang/3.7.0/include/wmmintrin.h +0 -42
  97. data/externals/oclint/lib/clang/3.7.0/include/x86intrin.h +0 -81
  98. data/externals/oclint/lib/clang/3.7.0/include/xmmintrin.h +0 -1008
  99. data/externals/oclint/lib/clang/3.7.0/include/xopintrin.h +0 -809
  100. data/externals/oclint/lib/clang/3.7.0/include/xtestintrin.h +0 -41
  101. data/externals/oclint/lib/clang/3.7.0/lib/darwin/libclang_rt.asan_iossim_dynamic.dylib +0 -0
  102. data/externals/oclint/lib/clang/3.7.0/lib/darwin/libclang_rt.asan_osx_dynamic.dylib +0 -0
  103. data/externals/oclint/lib/clang/3.7.0/lib/darwin/libclang_rt.builtins-i386.a +0 -0
  104. data/externals/oclint/lib/clang/3.7.0/lib/darwin/libclang_rt.builtins-x86_64.a +0 -0
  105. data/externals/oclint/lib/clang/3.7.0/lib/darwin/libclang_rt.profile_osx.a +0 -0
  106. data/externals/oclint/lib/clang/3.7.0/lib/darwin/libclang_rt.safestack_osx.a +0 -0
  107. data/externals/oclint/lib/clang/3.7.0/lib/darwin/libclang_rt.ubsan_iossim_dynamic.dylib +0 -0
  108. data/externals/oclint/lib/clang/3.7.0/lib/darwin/libclang_rt.ubsan_osx_dynamic.dylib +0 -0
  109. data/externals/oclint/lib/oclint/reporters/libHTMLReporter.dylib +0 -0
  110. data/externals/oclint/lib/oclint/reporters/libJSONReporter.dylib +0 -0
  111. data/externals/oclint/lib/oclint/reporters/libPMDReporter.dylib +0 -0
  112. data/externals/oclint/lib/oclint/reporters/libTextReporter.dylib +0 -0
  113. data/externals/oclint/lib/oclint/reporters/libXMLReporter.dylib +0 -0
  114. data/externals/oclint/lib/oclint/reporters/libXcodeReporter.dylib +0 -0
  115. data/externals/oclint/lib/oclint/rules/libAvoidBranchingStatementAsLastInLoopRule.dylib +0 -0
  116. data/externals/oclint/lib/oclint/rules/libAvoidDefaultArgumentsOnVirtualMethodsRule.dylib +0 -0
  117. data/externals/oclint/lib/oclint/rules/libAvoidPrivateStaticMembersRule.dylib +0 -0
  118. data/externals/oclint/lib/oclint/rules/libBaseClassDestructorShouldBeVirtualOrProtectedRule.dylib +0 -0
  119. data/externals/oclint/lib/oclint/rules/libBitwiseOperatorInConditionalRule.dylib +0 -0
  120. data/externals/oclint/lib/oclint/rules/libBrokenNullCheckRule.dylib +0 -0
  121. data/externals/oclint/lib/oclint/rules/libBrokenOddnessCheckRule.dylib +0 -0
  122. data/externals/oclint/lib/oclint/rules/libCollapsibleIfStatementsRule.dylib +0 -0
  123. data/externals/oclint/lib/oclint/rules/libConstantConditionalOperatorRule.dylib +0 -0
  124. data/externals/oclint/lib/oclint/rules/libConstantIfExpressionRule.dylib +0 -0
  125. data/externals/oclint/lib/oclint/rules/libCoveredSwitchStatementsDontNeedDefaultRule.dylib +0 -0
  126. data/externals/oclint/lib/oclint/rules/libCyclomaticComplexityRule.dylib +0 -0
  127. data/externals/oclint/lib/oclint/rules/libDeadCodeRule.dylib +0 -0
  128. data/externals/oclint/lib/oclint/rules/libDefaultLabelNotLastInSwitchStatementRule.dylib +0 -0
  129. data/externals/oclint/lib/oclint/rules/libDestructorOfVirtualClassRule.dylib +0 -0
  130. data/externals/oclint/lib/oclint/rules/libDoubleNegativeRule.dylib +0 -0
  131. data/externals/oclint/lib/oclint/rules/libEmptyCatchStatementRule.dylib +0 -0
  132. data/externals/oclint/lib/oclint/rules/libEmptyDoWhileStatementRule.dylib +0 -0
  133. data/externals/oclint/lib/oclint/rules/libEmptyElseBlockRule.dylib +0 -0
  134. data/externals/oclint/lib/oclint/rules/libEmptyFinallyStatementRule.dylib +0 -0
  135. data/externals/oclint/lib/oclint/rules/libEmptyForStatementRule.dylib +0 -0
  136. data/externals/oclint/lib/oclint/rules/libEmptyIfStatementRule.dylib +0 -0
  137. data/externals/oclint/lib/oclint/rules/libEmptySwitchStatementRule.dylib +0 -0
  138. data/externals/oclint/lib/oclint/rules/libEmptyTryStatementRule.dylib +0 -0
  139. data/externals/oclint/lib/oclint/rules/libEmptyWhileStatementRule.dylib +0 -0
  140. data/externals/oclint/lib/oclint/rules/libForLoopShouldBeWhileLoopRule.dylib +0 -0
  141. data/externals/oclint/lib/oclint/rules/libGotoStatementRule.dylib +0 -0
  142. data/externals/oclint/lib/oclint/rules/libInvertedLogicRule.dylib +0 -0
  143. data/externals/oclint/lib/oclint/rules/libJumbledIncrementerRule.dylib +0 -0
  144. data/externals/oclint/lib/oclint/rules/libLongClassRule.dylib +0 -0
  145. data/externals/oclint/lib/oclint/rules/libLongLineRule.dylib +0 -0
  146. data/externals/oclint/lib/oclint/rules/libLongMethodRule.dylib +0 -0
  147. data/externals/oclint/lib/oclint/rules/libLongVariableNameRule.dylib +0 -0
  148. data/externals/oclint/lib/oclint/rules/libMisplacedNullCheckRule.dylib +0 -0
  149. data/externals/oclint/lib/oclint/rules/libMissingBreakInSwitchStatementRule.dylib +0 -0
  150. data/externals/oclint/lib/oclint/rules/libMultipleUnaryOperatorRule.dylib +0 -0
  151. data/externals/oclint/lib/oclint/rules/libNPathComplexityRule.dylib +0 -0
  152. data/externals/oclint/lib/oclint/rules/libNcssMethodCountRule.dylib +0 -0
  153. data/externals/oclint/lib/oclint/rules/libNestedBlockDepthRule.dylib +0 -0
  154. data/externals/oclint/lib/oclint/rules/libNonCaseLabelInSwitchStatementRule.dylib +0 -0
  155. data/externals/oclint/lib/oclint/rules/libObjCAssignIvarOutsideAccessorsRule.dylib +0 -0
  156. data/externals/oclint/lib/oclint/rules/libObjCBoxedExpressionsRule.dylib +0 -0
  157. data/externals/oclint/lib/oclint/rules/libObjCContainerLiteralsRule.dylib +0 -0
  158. data/externals/oclint/lib/oclint/rules/libObjCNSNumberLiteralsRule.dylib +0 -0
  159. data/externals/oclint/lib/oclint/rules/libObjCObjectSubscriptingRule.dylib +0 -0
  160. data/externals/oclint/lib/oclint/rules/libObjCVerifyIsEqualHashRule.dylib +0 -0
  161. data/externals/oclint/lib/oclint/rules/libObjCVerifyMustCallSuperRule.dylib +0 -0
  162. data/externals/oclint/lib/oclint/rules/libObjCVerifyProhibitedCallRule.dylib +0 -0
  163. data/externals/oclint/lib/oclint/rules/libObjCVerifyProtectedMethodRule.dylib +0 -0
  164. data/externals/oclint/lib/oclint/rules/libObjCVerifySubclassMustImplementRule.dylib +0 -0
  165. data/externals/oclint/lib/oclint/rules/libParameterReassignmentRule.dylib +0 -0
  166. data/externals/oclint/lib/oclint/rules/libPreferEarlyExitRule.dylib +0 -0
  167. data/externals/oclint/lib/oclint/rules/libRedundantConditionalOperatorRule.dylib +0 -0
  168. data/externals/oclint/lib/oclint/rules/libRedundantIfStatementRule.dylib +0 -0
  169. data/externals/oclint/lib/oclint/rules/libRedundantLocalVariableRule.dylib +0 -0
  170. data/externals/oclint/lib/oclint/rules/libRedundantNilCheckRule.dylib +0 -0
  171. data/externals/oclint/lib/oclint/rules/libReturnFromFinallyBlockRule.dylib +0 -0
  172. data/externals/oclint/lib/oclint/rules/libShortVariableNameRule.dylib +0 -0
  173. data/externals/oclint/lib/oclint/rules/libSwitchStatementsShouldHaveDefaultRule.dylib +0 -0
  174. data/externals/oclint/lib/oclint/rules/libThrowExceptionFromFinallyBlockRule.dylib +0 -0
  175. data/externals/oclint/lib/oclint/rules/libTooFewBranchesInSwitchStatementRule.dylib +0 -0
  176. data/externals/oclint/lib/oclint/rules/libTooManyFieldsRule.dylib +0 -0
  177. data/externals/oclint/lib/oclint/rules/libTooManyMethodsRule.dylib +0 -0
  178. data/externals/oclint/lib/oclint/rules/libTooManyParametersRule.dylib +0 -0
  179. data/externals/oclint/lib/oclint/rules/libUnnecessaryElseStatementRule.dylib +0 -0
  180. data/externals/oclint/lib/oclint/rules/libUnnecessaryNullCheckForCXXDeallocRule.dylib +0 -0
  181. data/externals/oclint/lib/oclint/rules/libUnusedLocalVariableRule.dylib +0 -0
  182. data/externals/oclint/lib/oclint/rules/libUnusedMethodParameterRule.dylib +0 -0
  183. data/externals/oclint/lib/oclint/rules/libUselessParenthesesRule.dylib +0 -0
  184. data/lib/coverage_html_converter.rb +0 -141
  185. data/lib/coverage_plan.rb +0 -27
  186. data/lib/device.rb +0 -27
  187. data/lib/execute.rb +0 -7
  188. data/lib/lint_plan.rb +0 -41
  189. data/lib/rules.rb +0 -23
  190. data/lib/test_plan.rb +0 -11
  191. data/lib/version.rb +0 -3
  192. data/lib/xcode.rb +0 -128
  193. data/lib/xcodebuild-helper.rb +0 -135
  194. data/spec/coverage_html_coverter_spec.rb +0 -55
  195. data/spec/coverage_plan_spec.rb +0 -23
  196. data/spec/device_spec.rb +0 -24
  197. data/spec/lint_plan_spec.rb +0 -35
  198. data/spec/rule_spec.rb +0 -37
  199. data/spec/spec_helper.rb +0 -17
  200. data/spec/test_plan_spec.rb +0 -11
  201. data/spec/xcode_dsl_actions_spec.rb +0 -227
  202. data/spec/xcode_dsl_spec.rb +0 -176
  203. data/spec/xcode_spec.rb +0 -85
  204. data/xcodebuild-helper.gemspec +0 -27
@@ -1,155 +0,0 @@
1
- //===-- sanitizer/asan_interface.h ------------------------------*- C++ -*-===//
2
- //
3
- // The LLVM Compiler Infrastructure
4
- //
5
- // This file is distributed under the University of Illinois Open Source
6
- // License. See LICENSE.TXT for details.
7
- //
8
- //===----------------------------------------------------------------------===//
9
- //
10
- // This file is a part of AddressSanitizer.
11
- //
12
- // Public interface header.
13
- //===----------------------------------------------------------------------===//
14
- #ifndef SANITIZER_ASAN_INTERFACE_H
15
- #define SANITIZER_ASAN_INTERFACE_H
16
-
17
- #include <sanitizer/common_interface_defs.h>
18
-
19
- #ifdef __cplusplus
20
- extern "C" {
21
- #endif
22
- // Marks memory region [addr, addr+size) as unaddressable.
23
- // This memory must be previously allocated by the user program. Accessing
24
- // addresses in this region from instrumented code is forbidden until
25
- // this region is unpoisoned. This function is not guaranteed to poison
26
- // the whole region - it may poison only subregion of [addr, addr+size) due
27
- // to ASan alignment restrictions.
28
- // Method is NOT thread-safe in the sense that no two threads can
29
- // (un)poison memory in the same memory region simultaneously.
30
- void __asan_poison_memory_region(void const volatile *addr, size_t size);
31
- // Marks memory region [addr, addr+size) as addressable.
32
- // This memory must be previously allocated by the user program. Accessing
33
- // addresses in this region is allowed until this region is poisoned again.
34
- // This function may unpoison a superregion of [addr, addr+size) due to
35
- // ASan alignment restrictions.
36
- // Method is NOT thread-safe in the sense that no two threads can
37
- // (un)poison memory in the same memory region simultaneously.
38
- void __asan_unpoison_memory_region(void const volatile *addr, size_t size);
39
-
40
- // User code should use macros instead of functions.
41
- #if __has_feature(address_sanitizer) || defined(__SANITIZE_ADDRESS__)
42
- #define ASAN_POISON_MEMORY_REGION(addr, size) \
43
- __asan_poison_memory_region((addr), (size))
44
- #define ASAN_UNPOISON_MEMORY_REGION(addr, size) \
45
- __asan_unpoison_memory_region((addr), (size))
46
- #else
47
- #define ASAN_POISON_MEMORY_REGION(addr, size) \
48
- ((void)(addr), (void)(size))
49
- #define ASAN_UNPOISON_MEMORY_REGION(addr, size) \
50
- ((void)(addr), (void)(size))
51
- #endif
52
-
53
- // Returns 1 if addr is poisoned (i.e. 1-byte read/write access to this
54
- // address will result in error report from AddressSanitizer).
55
- // Otherwise returns 0.
56
- int __asan_address_is_poisoned(void const volatile *addr);
57
-
58
- // If at least one byte in [beg, beg+size) is poisoned, return the address
59
- // of the first such byte. Otherwise return 0.
60
- void *__asan_region_is_poisoned(void *beg, size_t size);
61
-
62
- // Print the description of addr (useful when debugging in gdb).
63
- void __asan_describe_address(void *addr);
64
-
65
- // Useful for calling from a debugger to get information about an ASan error.
66
- // Returns 1 if an error has been (or is being) reported, otherwise returns 0.
67
- int __asan_report_present();
68
-
69
- // Useful for calling from a debugger to get information about an ASan error.
70
- // If an error has been (or is being) reported, the following functions return
71
- // the pc, bp, sp, address, access type (0 = read, 1 = write), access size and
72
- // bug description (e.g. "heap-use-after-free"). Otherwise they return 0.
73
- void *__asan_get_report_pc();
74
- void *__asan_get_report_bp();
75
- void *__asan_get_report_sp();
76
- void *__asan_get_report_address();
77
- int __asan_get_report_access_type();
78
- size_t __asan_get_report_access_size();
79
- const char *__asan_get_report_description();
80
-
81
- // Useful for calling from the debugger to get information about a pointer.
82
- // Returns the category of the given pointer as a constant string.
83
- // Possible return values are "global", "stack", "stack-fake", "heap",
84
- // "heap-invalid", "shadow-low", "shadow-gap", "shadow-high", "unknown".
85
- // If global or stack, tries to also return the variable name, address and
86
- // size. If heap, tries to return the chunk address and size. 'name' should
87
- // point to an allocated buffer of size 'name_size'.
88
- const char *__asan_locate_address(void *addr, char *name, size_t name_size,
89
- void **region_address, size_t *region_size);
90
-
91
- // Useful for calling from the debugger to get the allocation stack trace
92
- // and thread ID for a heap address. Stores up to 'size' frames into 'trace',
93
- // returns the number of stored frames or 0 on error.
94
- size_t __asan_get_alloc_stack(void *addr, void **trace, size_t size,
95
- int *thread_id);
96
-
97
- // Useful for calling from the debugger to get the free stack trace
98
- // and thread ID for a heap address. Stores up to 'size' frames into 'trace',
99
- // returns the number of stored frames or 0 on error.
100
- size_t __asan_get_free_stack(void *addr, void **trace, size_t size,
101
- int *thread_id);
102
-
103
- // Useful for calling from the debugger to get the current shadow memory
104
- // mapping.
105
- void __asan_get_shadow_mapping(size_t *shadow_scale, size_t *shadow_offset);
106
-
107
- // This is an internal function that is called to report an error.
108
- // However it is still a part of the interface because users may want to
109
- // set a breakpoint on this function in a debugger.
110
- void __asan_report_error(void *pc, void *bp, void *sp,
111
- void *addr, int is_write, size_t access_size);
112
-
113
- // Sets the exit code to use when reporting an error.
114
- // Returns the old value.
115
- int __asan_set_error_exit_code(int exit_code);
116
-
117
- // Deprecated. Call __sanitizer_set_death_callback instead.
118
- void __asan_set_death_callback(void (*callback)(void));
119
-
120
- void __asan_set_error_report_callback(void (*callback)(const char*));
121
-
122
- // User may provide function that would be called right when ASan detects
123
- // an error. This can be used to notice cases when ASan detects an error, but
124
- // the program crashes before ASan report is printed.
125
- void __asan_on_error();
126
-
127
- // Prints accumulated stats to stderr. Used for debugging.
128
- void __asan_print_accumulated_stats();
129
-
130
- // This function may be optionally provided by user and should return
131
- // a string containing ASan runtime options. See asan_flags.h for details.
132
- const char* __asan_default_options();
133
-
134
- // The following 2 functions facilitate garbage collection in presence of
135
- // asan's fake stack.
136
-
137
- // Returns an opaque handler to be used later in __asan_addr_is_in_fake_stack.
138
- // Returns NULL if the current thread does not have a fake stack.
139
- void *__asan_get_current_fake_stack();
140
-
141
- // If fake_stack is non-NULL and addr belongs to a fake frame in
142
- // fake_stack, returns the address on real stack that corresponds to
143
- // the fake frame and sets beg/end to the boundaries of this fake frame.
144
- // Otherwise returns NULL and does not touch beg/end.
145
- // If beg/end are NULL, they are not touched.
146
- // This function may be called from a thread other than the owner of
147
- // fake_stack, but the owner thread need to be alive.
148
- void *__asan_addr_is_in_fake_stack(void *fake_stack, void *addr, void **beg,
149
- void **end);
150
-
151
- #ifdef __cplusplus
152
- } // extern "C"
153
- #endif
154
-
155
- #endif // SANITIZER_ASAN_INTERFACE_H
@@ -1,118 +0,0 @@
1
- //===-- sanitizer/common_interface_defs.h -----------------------*- C++ -*-===//
2
- //
3
- // The LLVM Compiler Infrastructure
4
- //
5
- // This file is distributed under the University of Illinois Open Source
6
- // License. See LICENSE.TXT for details.
7
- //
8
- //===----------------------------------------------------------------------===//
9
- //
10
- // Common part of the public sanitizer interface.
11
- //===----------------------------------------------------------------------===//
12
-
13
- #ifndef SANITIZER_COMMON_INTERFACE_DEFS_H
14
- #define SANITIZER_COMMON_INTERFACE_DEFS_H
15
-
16
- #include <stddef.h>
17
- #include <stdint.h>
18
-
19
- // GCC does not understand __has_feature.
20
- #if !defined(__has_feature)
21
- # define __has_feature(x) 0
22
- #endif
23
-
24
- #ifdef __cplusplus
25
- extern "C" {
26
- #endif
27
- // Arguments for __sanitizer_sandbox_on_notify() below.
28
- typedef struct {
29
- // Enable sandbox support in sanitizer coverage.
30
- int coverage_sandboxed;
31
- // File descriptor to write coverage data to. If -1 is passed, a file will
32
- // be pre-opened by __sanitizer_sandobx_on_notify(). This field has no
33
- // effect if coverage_sandboxed == 0.
34
- intptr_t coverage_fd;
35
- // If non-zero, split the coverage data into well-formed blocks. This is
36
- // useful when coverage_fd is a socket descriptor. Each block will contain
37
- // a header, allowing data from multiple processes to be sent over the same
38
- // socket.
39
- unsigned int coverage_max_block_size;
40
- } __sanitizer_sandbox_arguments;
41
-
42
- // Tell the tools to write their reports to "path.<pid>" instead of stderr.
43
- void __sanitizer_set_report_path(const char *path);
44
-
45
- // Notify the tools that the sandbox is going to be turned on. The reserved
46
- // parameter will be used in the future to hold a structure with functions
47
- // that the tools may call to bypass the sandbox.
48
- void __sanitizer_sandbox_on_notify(__sanitizer_sandbox_arguments *args);
49
-
50
- // This function is called by the tool when it has just finished reporting
51
- // an error. 'error_summary' is a one-line string that summarizes
52
- // the error message. This function can be overridden by the client.
53
- void __sanitizer_report_error_summary(const char *error_summary);
54
-
55
- // Some of the sanitizers (e.g. asan/tsan) may miss bugs that happen
56
- // in unaligned loads/stores. In order to find such bugs reliably one needs
57
- // to replace plain unaligned loads/stores with these calls.
58
- uint16_t __sanitizer_unaligned_load16(const void *p);
59
- uint32_t __sanitizer_unaligned_load32(const void *p);
60
- uint64_t __sanitizer_unaligned_load64(const void *p);
61
- void __sanitizer_unaligned_store16(void *p, uint16_t x);
62
- void __sanitizer_unaligned_store32(void *p, uint32_t x);
63
- void __sanitizer_unaligned_store64(void *p, uint64_t x);
64
-
65
- // Annotate the current state of a contiguous container, such as
66
- // std::vector, std::string or similar.
67
- // A contiguous container is a container that keeps all of its elements
68
- // in a contiguous region of memory. The container owns the region of memory
69
- // [beg, end); the memory [beg, mid) is used to store the current elements
70
- // and the memory [mid, end) is reserved for future elements;
71
- // beg <= mid <= end. For example, in "std::vector<> v"
72
- // beg = &v[0];
73
- // end = beg + v.capacity() * sizeof(v[0]);
74
- // mid = beg + v.size() * sizeof(v[0]);
75
- //
76
- // This annotation tells the Sanitizer tool about the current state of the
77
- // container so that the tool can report errors when memory from [mid, end)
78
- // is accessed. Insert this annotation into methods like push_back/pop_back.
79
- // Supply the old and the new values of mid (old_mid/new_mid).
80
- // In the initial state mid == end and so should be the final
81
- // state when the container is destroyed or when it reallocates the storage.
82
- //
83
- // Use with caution and don't use for anything other than vector-like classes.
84
- //
85
- // For AddressSanitizer, 'beg' should be 8-aligned and 'end' should
86
- // be either 8-aligned or it should point to the end of a separate heap-,
87
- // stack-, or global- allocated buffer. I.e. the following will not work:
88
- // int64_t x[2]; // 16 bytes, 8-aligned.
89
- // char *beg = (char *)&x[0];
90
- // char *end = beg + 12; // Not 8 aligned, not the end of the buffer.
91
- // This however will work fine:
92
- // int32_t x[3]; // 12 bytes, but 8-aligned under AddressSanitizer.
93
- // char *beg = (char*)&x[0];
94
- // char *end = beg + 12; // Not 8-aligned, but is the end of the buffer.
95
- void __sanitizer_annotate_contiguous_container(const void *beg,
96
- const void *end,
97
- const void *old_mid,
98
- const void *new_mid);
99
- // Returns true if the contiguous container [beg, end) is properly poisoned
100
- // (e.g. with __sanitizer_annotate_contiguous_container), i.e. if
101
- // - [beg, mid) is addressable,
102
- // - [mid, end) is unaddressable.
103
- // Full verification requires O(end-beg) time; this function tries to avoid
104
- // such complexity by touching only parts of the container around beg/mid/end.
105
- int __sanitizer_verify_contiguous_container(const void *beg, const void *mid,
106
- const void *end);
107
-
108
- // Print the stack trace leading to this call. Useful for debugging user code.
109
- void __sanitizer_print_stack_trace();
110
-
111
- // Sets the callback to be called right before death on error.
112
- // Passing 0 will unset the callback.
113
- void __sanitizer_set_death_callback(void (*callback)(void));
114
- #ifdef __cplusplus
115
- } // extern "C"
116
- #endif
117
-
118
- #endif // SANITIZER_COMMON_INTERFACE_DEFS_H
@@ -1,63 +0,0 @@
1
- //===-- sanitizer/coverage_interface.h --------------------------*- C++ -*-===//
2
- //
3
- // The LLVM Compiler Infrastructure
4
- //
5
- // This file is distributed under the University of Illinois Open Source
6
- // License. See LICENSE.TXT for details.
7
- //
8
- //===----------------------------------------------------------------------===//
9
- //
10
- // Public interface for sanitizer coverage.
11
- //===----------------------------------------------------------------------===//
12
-
13
- #ifndef SANITIZER_COVERAG_INTERFACE_H
14
- #define SANITIZER_COVERAG_INTERFACE_H
15
-
16
- #include <sanitizer/common_interface_defs.h>
17
-
18
- #ifdef __cplusplus
19
- extern "C" {
20
- #endif
21
-
22
- // Initialize coverage.
23
- void __sanitizer_cov_init();
24
- // Record and dump coverage info.
25
- void __sanitizer_cov_dump();
26
- // Open <name>.sancov.packed in the coverage directory and return the file
27
- // descriptor. Returns -1 on failure, or if coverage dumping is disabled.
28
- // This is intended for use by sandboxing code.
29
- intptr_t __sanitizer_maybe_open_cov_file(const char *name);
30
- // Get the number of total unique covered entities (blocks, edges, calls).
31
- // This can be useful for coverage-directed in-process fuzzers.
32
- uintptr_t __sanitizer_get_total_unique_coverage();
33
-
34
- // Reset the basic-block (edge) coverage to the initial state.
35
- // Useful for in-process fuzzing to start collecting coverage from scratch.
36
- // Experimental, will likely not work for multi-threaded process.
37
- void __sanitizer_reset_coverage();
38
- // Set *data to the array of covered PCs and return the size of that array.
39
- // Some of the entries in *data will be zero.
40
- uintptr_t __sanitizer_get_coverage_guards(uintptr_t **data);
41
-
42
- // The coverage instrumentation may optionally provide imprecise counters.
43
- // Rather than exposing the counter values to the user we instead map
44
- // the counters to a bitset.
45
- // Every counter is associated with 8 bits in the bitset.
46
- // We define 8 value ranges: 1, 2, 3, 4-7, 8-15, 16-31, 32-127, 128+
47
- // The i-th bit is set to 1 if the counter value is in the i-th range.
48
- // This counter-based coverage implementation is *not* thread-safe.
49
-
50
- // Returns the number of registered coverage counters.
51
- uintptr_t __sanitizer_get_number_of_counters();
52
- // Updates the counter 'bitset', clears the counters and returns the number of
53
- // new bits in 'bitset'.
54
- // If 'bitset' is nullptr, only clears the counters.
55
- // Otherwise 'bitset' should be at least
56
- // __sanitizer_get_number_of_counters bytes long and 8-aligned.
57
- uintptr_t
58
- __sanitizer_update_counter_bitset_and_clear_counters(uint8_t *bitset);
59
- #ifdef __cplusplus
60
- } // extern "C"
61
- #endif
62
-
63
- #endif // SANITIZER_COVERAG_INTERFACE_H
@@ -1,114 +0,0 @@
1
- //===-- dfsan_interface.h -------------------------------------------------===//
2
- //
3
- // The LLVM Compiler Infrastructure
4
- //
5
- // This file is distributed under the University of Illinois Open Source
6
- // License. See LICENSE.TXT for details.
7
- //
8
- //===----------------------------------------------------------------------===//
9
- //
10
- // This file is a part of DataFlowSanitizer.
11
- //
12
- // Public interface header.
13
- //===----------------------------------------------------------------------===//
14
- #ifndef DFSAN_INTERFACE_H
15
- #define DFSAN_INTERFACE_H
16
-
17
- #include <stddef.h>
18
- #include <stdint.h>
19
- #include <sanitizer/common_interface_defs.h>
20
-
21
- #ifdef __cplusplus
22
- extern "C" {
23
- #endif
24
-
25
- typedef uint16_t dfsan_label;
26
-
27
- /// Stores information associated with a specific label identifier. A label
28
- /// may be a base label created using dfsan_create_label, with associated
29
- /// text description and user data, or an automatically created union label,
30
- /// which represents the union of two label identifiers (which may themselves
31
- /// be base or union labels).
32
- struct dfsan_label_info {
33
- // Fields for union labels, set to 0 for base labels.
34
- dfsan_label l1;
35
- dfsan_label l2;
36
-
37
- // Fields for base labels.
38
- const char *desc;
39
- void *userdata;
40
- };
41
-
42
- /// Signature of the callback argument to dfsan_set_write_callback().
43
- typedef void (*dfsan_write_callback_t)(int fd, const void *buf, size_t count);
44
-
45
- /// Computes the union of \c l1 and \c l2, possibly creating a union label in
46
- /// the process.
47
- dfsan_label dfsan_union(dfsan_label l1, dfsan_label l2);
48
-
49
- /// Creates and returns a base label with the given description and user data.
50
- dfsan_label dfsan_create_label(const char *desc, void *userdata);
51
-
52
- /// Sets the label for each address in [addr,addr+size) to \c label.
53
- void dfsan_set_label(dfsan_label label, void *addr, size_t size);
54
-
55
- /// Sets the label for each address in [addr,addr+size) to the union of the
56
- /// current label for that address and \c label.
57
- void dfsan_add_label(dfsan_label label, void *addr, size_t size);
58
-
59
- /// Retrieves the label associated with the given data.
60
- ///
61
- /// The type of 'data' is arbitrary. The function accepts a value of any type,
62
- /// which can be truncated or extended (implicitly or explicitly) as necessary.
63
- /// The truncation/extension operations will preserve the label of the original
64
- /// value.
65
- dfsan_label dfsan_get_label(long data);
66
-
67
- /// Retrieves the label associated with the data at the given address.
68
- dfsan_label dfsan_read_label(const void *addr, size_t size);
69
-
70
- /// Retrieves a pointer to the dfsan_label_info struct for the given label.
71
- const struct dfsan_label_info *dfsan_get_label_info(dfsan_label label);
72
-
73
- /// Returns whether the given label label contains the label elem.
74
- int dfsan_has_label(dfsan_label label, dfsan_label elem);
75
-
76
- /// If the given label label contains a label with the description desc, returns
77
- /// that label, else returns 0.
78
- dfsan_label dfsan_has_label_with_desc(dfsan_label label, const char *desc);
79
-
80
- /// Returns the number of labels allocated.
81
- size_t dfsan_get_label_count(void);
82
-
83
- /// Sets a callback to be invoked on calls to write(). The callback is invoked
84
- /// before the write is done. The write is not guaranteed to succeed when the
85
- /// callback executes. Pass in NULL to remove any callback.
86
- void dfsan_set_write_callback(dfsan_write_callback_t labeled_write_callback);
87
-
88
- /// Writes the labels currently used by the program to the given file
89
- /// descriptor. The lines of the output have the following format:
90
- ///
91
- /// <label> <parent label 1> <parent label 2> <label description if any>
92
- void dfsan_dump_labels(int fd);
93
-
94
- /// Whenever a dfsan's custom function is called the corresponding
95
- /// hook is called it non-zero. The hooks should be defined by the user.
96
- /// The primary use case is taint-guided fuzzing, where the fuzzer
97
- /// needs to see the parameters of the function and the labels.
98
- /// FIXME: implement more hooks.
99
-
100
- /// memcmp hook.
101
- void dfsan_weak_hook_memcmp(void *caller_pc, const void *s1, const void *s2,
102
- size_t n, dfsan_label s1_label,
103
- dfsan_label s2_label, dfsan_label n_label);
104
- #ifdef __cplusplus
105
- } // extern "C"
106
-
107
- template <typename T>
108
- void dfsan_set_label(dfsan_label label, T &data) { // NOLINT
109
- dfsan_set_label(label, (void *)&data, sizeof(T));
110
- }
111
-
112
- #endif
113
-
114
- #endif // DFSAN_INTERFACE_H