crosshair-tool 0.0.86__tar.gz → 0.0.88__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of crosshair-tool might be problematic. Click here for more details.

Files changed (180) hide show
  1. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/PKG-INFO +2 -2
  2. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/__init__.py +1 -1
  3. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/_mark_stacks.h +2 -19
  4. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/_tracers.c +12 -9
  5. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/_tracers.h +6 -5
  6. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/auditwall.py +8 -5
  7. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/libimpl/builtinslib.py +11 -17
  8. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/libimpl/builtinslib_test.py +21 -11
  9. crosshair_tool-0.0.88/crosshair/libimpl/copylib_test.py +18 -0
  10. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/libimpl/datetimelib.py +8 -2
  11. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/main_test.py +1 -1
  12. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/opcode_intercept_test.py +16 -0
  13. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair_tool.egg-info/PKG-INFO +2 -2
  14. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair_tool.egg-info/SOURCES.txt +1 -0
  15. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair_tool.egg-info/requires.txt +1 -1
  16. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/setup.py +2 -2
  17. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/LICENSE +0 -0
  18. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/README.md +0 -0
  19. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/__main__.py +0 -0
  20. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/_preliminaries_test.py +0 -0
  21. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/_tracers_pycompat.h +0 -0
  22. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/_tracers_test.py +0 -0
  23. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/abcstring.py +0 -0
  24. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/auditwall_test.py +0 -0
  25. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/codeconfig.py +0 -0
  26. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/codeconfig_test.py +0 -0
  27. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/condition_parser.py +0 -0
  28. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/condition_parser_test.py +0 -0
  29. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/conftest.py +0 -0
  30. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/copyext.py +0 -0
  31. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/copyext_test.py +0 -0
  32. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/core.py +0 -0
  33. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/core_and_libs.py +0 -0
  34. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/core_regestered_types_test.py +0 -0
  35. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/core_test.py +0 -0
  36. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/diff_behavior.py +0 -0
  37. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/diff_behavior_test.py +0 -0
  38. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/dynamic_typing.py +0 -0
  39. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/dynamic_typing_test.py +0 -0
  40. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/enforce.py +0 -0
  41. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/enforce_test.py +0 -0
  42. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/examples/PEP316/__init__.py +0 -0
  43. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/examples/PEP316/bugs_detected/__init__.py +0 -0
  44. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/examples/PEP316/bugs_detected/getattr_magic.py +0 -0
  45. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/examples/PEP316/bugs_detected/hash_consistent_with_equals.py +0 -0
  46. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/examples/PEP316/bugs_detected/shopping_cart.py +0 -0
  47. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/examples/PEP316/bugs_detected/showcase.py +0 -0
  48. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/examples/PEP316/correct_code/__init__.py +0 -0
  49. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/examples/PEP316/correct_code/arith.py +0 -0
  50. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/examples/PEP316/correct_code/chess.py +0 -0
  51. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/examples/PEP316/correct_code/nesting_inference.py +0 -0
  52. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/examples/PEP316/correct_code/numpy_examples.py +0 -0
  53. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/examples/PEP316/correct_code/rolling_average.py +0 -0
  54. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/examples/PEP316/correct_code/showcase.py +0 -0
  55. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/examples/__init__.py +0 -0
  56. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/examples/check_examples_test.py +0 -0
  57. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/examples/deal/__init__.py +0 -0
  58. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/examples/icontract/__init__.py +0 -0
  59. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/examples/icontract/bugs_detected/__init__.py +0 -0
  60. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/examples/icontract/bugs_detected/showcase.py +0 -0
  61. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/examples/icontract/bugs_detected/wrong_sign.py +0 -0
  62. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/examples/icontract/correct_code/__init__.py +0 -0
  63. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/examples/icontract/correct_code/arith.py +0 -0
  64. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/examples/icontract/correct_code/showcase.py +0 -0
  65. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/fnutil.py +0 -0
  66. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/fnutil_test.py +0 -0
  67. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/fuzz_core_test.py +0 -0
  68. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/libimpl/__init__.py +0 -0
  69. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/libimpl/arraylib.py +0 -0
  70. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/libimpl/binascii_ch_test.py +0 -0
  71. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/libimpl/binascii_test.py +0 -0
  72. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/libimpl/binasciilib.py +0 -0
  73. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/libimpl/bisectlib_test.py +0 -0
  74. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/libimpl/builtinslib_ch_test.py +0 -0
  75. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/libimpl/codecslib.py +0 -0
  76. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/libimpl/codecslib_test.py +0 -0
  77. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/libimpl/collectionslib.py +0 -0
  78. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/libimpl/collectionslib_ch_test.py +0 -0
  79. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/libimpl/collectionslib_test.py +0 -0
  80. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/libimpl/copylib.py +0 -0
  81. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/libimpl/datetimelib_ch_test.py +0 -0
  82. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/libimpl/datetimelib_test.py +0 -0
  83. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/libimpl/decimallib.py +0 -0
  84. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/libimpl/decimallib_ch_test.py +0 -0
  85. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/libimpl/decimallib_test.py +0 -0
  86. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/libimpl/encodings/__init__.py +0 -0
  87. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/libimpl/encodings/_encutil.py +0 -0
  88. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/libimpl/encodings/ascii.py +0 -0
  89. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/libimpl/encodings/latin_1.py +0 -0
  90. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/libimpl/encodings/utf_8.py +0 -0
  91. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/libimpl/encodings_ch_test.py +0 -0
  92. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/libimpl/fractionlib.py +0 -0
  93. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/libimpl/fractionlib_test.py +0 -0
  94. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/libimpl/functoolslib.py +0 -0
  95. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/libimpl/functoolslib_test.py +0 -0
  96. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/libimpl/hashliblib.py +0 -0
  97. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/libimpl/hashliblib_test.py +0 -0
  98. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/libimpl/heapqlib.py +0 -0
  99. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/libimpl/heapqlib_test.py +0 -0
  100. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/libimpl/importliblib.py +0 -0
  101. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/libimpl/importliblib_test.py +0 -0
  102. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/libimpl/iolib.py +0 -0
  103. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/libimpl/iolib_ch_test.py +0 -0
  104. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/libimpl/iolib_test.py +0 -0
  105. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/libimpl/ipaddresslib.py +0 -0
  106. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/libimpl/itertoolslib.py +0 -0
  107. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/libimpl/itertoolslib_test.py +0 -0
  108. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/libimpl/jsonlib.py +0 -0
  109. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/libimpl/jsonlib_ch_test.py +0 -0
  110. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/libimpl/jsonlib_test.py +0 -0
  111. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/libimpl/mathlib.py +0 -0
  112. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/libimpl/mathlib_ch_test.py +0 -0
  113. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/libimpl/mathlib_test.py +0 -0
  114. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/libimpl/oslib.py +0 -0
  115. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/libimpl/pathliblib_test.py +0 -0
  116. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/libimpl/randomlib.py +0 -0
  117. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/libimpl/randomlib_test.py +0 -0
  118. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/libimpl/relib.py +0 -0
  119. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/libimpl/relib_ch_test.py +0 -0
  120. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/libimpl/relib_test.py +0 -0
  121. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/libimpl/timelib.py +0 -0
  122. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/libimpl/timelib_test.py +0 -0
  123. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/libimpl/typeslib.py +0 -0
  124. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/libimpl/typeslib_test.py +0 -0
  125. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/libimpl/unicodedatalib.py +0 -0
  126. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/libimpl/unicodedatalib_test.py +0 -0
  127. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/libimpl/urlliblib.py +0 -0
  128. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/libimpl/urlliblib_test.py +0 -0
  129. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/libimpl/weakreflib.py +0 -0
  130. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/libimpl/weakreflib_test.py +0 -0
  131. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/libimpl/zliblib.py +0 -0
  132. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/libimpl/zliblib_test.py +0 -0
  133. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/lsp_server.py +0 -0
  134. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/lsp_server_test.py +0 -0
  135. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/main.py +0 -0
  136. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/objectproxy.py +0 -0
  137. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/objectproxy_test.py +0 -0
  138. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/opcode_intercept.py +0 -0
  139. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/options.py +0 -0
  140. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/options_test.py +0 -0
  141. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/patch_equivalence_test.py +0 -0
  142. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/path_cover.py +0 -0
  143. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/path_cover_test.py +0 -0
  144. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/path_search.py +0 -0
  145. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/path_search_test.py +0 -0
  146. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/pathing_oracle.py +0 -0
  147. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/pure_importer.py +0 -0
  148. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/pure_importer_test.py +0 -0
  149. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/py.typed +0 -0
  150. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/register_contract.py +0 -0
  151. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/register_contract_test.py +0 -0
  152. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/simplestructs.py +0 -0
  153. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/simplestructs_test.py +0 -0
  154. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/smtlib.py +0 -0
  155. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/smtlib_test.py +0 -0
  156. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/statespace.py +0 -0
  157. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/statespace_test.py +0 -0
  158. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/stubs_parser.py +0 -0
  159. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/stubs_parser_test.py +0 -0
  160. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/test_util.py +0 -0
  161. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/test_util_test.py +0 -0
  162. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/tools/__init__.py +0 -0
  163. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/tools/check_help_in_doc.py +0 -0
  164. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/tools/check_init_and_setup_coincide.py +0 -0
  165. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/tools/generate_demo_table.py +0 -0
  166. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/tracers.py +0 -0
  167. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/tracers_test.py +0 -0
  168. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/type_repo.py +0 -0
  169. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/unicode_categories.py +0 -0
  170. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/unicode_categories_test.py +0 -0
  171. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/util.py +0 -0
  172. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/util_test.py +0 -0
  173. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/watcher.py +0 -0
  174. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/watcher_test.py +0 -0
  175. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/z3util.py +0 -0
  176. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair/z3util_test.py +0 -0
  177. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair_tool.egg-info/dependency_links.txt +0 -0
  178. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair_tool.egg-info/entry_points.txt +0 -0
  179. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/crosshair_tool.egg-info/top_level.txt +0 -0
  180. {crosshair_tool-0.0.86 → crosshair_tool-0.0.88}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: crosshair-tool
3
- Version: 0.0.86
3
+ Version: 0.0.88
4
4
  Summary: Analyze Python code for correctness using symbolic execution.
5
5
  Home-page: https://github.com/pschanely/CrossHair
6
6
  Author: Phillip Schanely
@@ -46,7 +46,7 @@ Requires-Dist: pytest-xdist; extra == "dev"
46
46
  Requires-Dist: setuptools; extra == "dev"
47
47
  Requires-Dist: sphinx>=3.4.3; extra == "dev"
48
48
  Requires-Dist: sphinx-rtd-theme>=0.5.1; extra == "dev"
49
- Requires-Dist: wheel; extra == "dev"
49
+ Requires-Dist: rst2pdf>=0.102; extra == "dev"
50
50
  Dynamic: author
51
51
  Dynamic: author-email
52
52
  Dynamic: classifier
@@ -15,7 +15,7 @@ from crosshair.statespace import StateSpace
15
15
  from crosshair.tracers import NoTracing, ResumedTracing
16
16
  from crosshair.util import IgnoreAttempt, debug
17
17
 
18
- __version__ = "0.0.86" # Do not forget to update in setup.py!
18
+ __version__ = "0.0.88" # Do not forget to update in setup.py!
19
19
  __author__ = "Phillip Schanely"
20
20
  __license__ = "MIT"
21
21
  __status__ = "Alpha"
@@ -538,23 +538,6 @@ static const uint8_t _ch_DE_INSTRUMENT[256] = {
538
538
  #endif
539
539
  #endif
540
540
 
541
- /* Get the underlying opcode, stripping instrumentation */
542
- int _ch_Py_GetBaseOpcode(PyCodeObject *code, int i)
543
- {
544
- int opcode = _PyCode_CODE(code)[i].op.code;
545
- if (opcode == INSTRUMENTED_LINE) {
546
- opcode = code->_co_monitoring->lines[i].original_opcode;
547
- }
548
- if (opcode == INSTRUMENTED_INSTRUCTION) {
549
- opcode = code->_co_monitoring->per_instruction_opcodes[i];
550
- }
551
- int deinstrumented = _ch_DE_INSTRUMENT[opcode];
552
- if (deinstrumented) {
553
- return deinstrumented;
554
- }
555
- return _ch_PyOpcode_Deopt[opcode];
556
- }
557
-
558
541
  static int64_t *
559
542
  _ch_mark_stacks(PyCodeObject *code_obj, int len)
560
543
  {
@@ -602,14 +585,14 @@ _ch_mark_stacks(PyCodeObject *code_obj, int len)
602
585
  /* Scan instructions */
603
586
  for (i = 0; i < len;) {
604
587
  int64_t next_stack = stacks[i];
605
- opcode = _ch_Py_GetBaseOpcode(code_obj, i);
588
+ opcode = code[i].op.code;
606
589
  uint8_t trace_enabled_here = _ch_TRACABLE_INSTRUCTIONS[opcode];
607
590
  enabled_tracing[i] |= trace_enabled_here;
608
591
  int oparg = 0;
609
592
  while (opcode == EXTENDED_ARG) {
610
593
  oparg = (oparg << 8) | code[i].op.arg;
611
594
  i++;
612
- opcode = _ch_Py_GetBaseOpcode(code_obj, i);
595
+ opcode = code[i].op.code;
613
596
  stacks[i] = next_stack;
614
597
  }
615
598
  int next_i = i + _ch_PyOpcode_Caches[opcode] + 1;
@@ -383,17 +383,19 @@ if (!self->trace_all_opcodes) {
383
383
  unsigned char * code_bytes = (unsigned char *)PyBytes_AS_STRING(code_bytes_object);
384
384
 
385
385
  self->handling = TRUE;
386
- BOOL ran_handler = FALSE;
387
386
 
388
- FrameAndCallbackVec* vec = &self->postop_callbacks;
387
+ FrameNextIandCallbackVec* vec = &self->postop_callbacks;
389
388
  int cb_count = vec->count;
390
389
  if (cb_count > 0)
391
390
  {
392
- FrameAndCallback fcb = vec->items[cb_count - 1];
391
+ FrameNextIandCallback fcb = vec->items[cb_count - 1];
393
392
  // Check that the top callback is for this frame (it might be for a caller's frame instead)
394
- if (fcb.frame == (PyObject*)frame)
393
+ if (fcb.frame == frame)
395
394
  {
396
- ran_handler = TRUE;
395
+ if (fcb.expected_i != PyFrame_GetLasti(frame)) {
396
+ // Most likely, we fell into an exception handler and should not execute the callback.
397
+ // fprintf(stderr, "UNEXPECTED lasti: %x %d %d, dropping callback\n", fcb.frame, fcb.expected_i, PyFrame_GetLasti(frame));
398
+ } else {
397
399
  PyObject* cb = fcb.callback;
398
400
  PyObject* result = NULL;
399
401
  result = PyObject_CallObject(cb, NULL);
@@ -406,6 +408,7 @@ if (!self->trace_all_opcodes) {
406
408
  Py_DECREF(result);
407
409
  vec->count--;
408
410
  Py_DECREF(cb);
411
+ }
409
412
  }
410
413
  }
411
414
 
@@ -423,7 +426,6 @@ if (!self->trace_all_opcodes) {
423
426
  if (handler == NULL) {
424
427
  continue;
425
428
  }
426
- ran_handler = TRUE;
427
429
 
428
430
  PyObject * arglist = Py_BuildValue("Osi", frame, "opcode", opcode);
429
431
  if (arglist == NULL) // (out of memory)
@@ -441,7 +443,7 @@ if (!self->trace_all_opcodes) {
441
443
  Py_DECREF(result);
442
444
  }
443
445
  // repr_print(frame);
444
- // printf("lasti %d, line %d, cb_count %d, ran_handler %d, ret %d\n", lasti, PyFrame_GetLineNumber(frame), cb_count, ran_handler, ret);
446
+ // printf("lasti %d, line %d, cb_count %d, ret %d\n", lasti, PyFrame_GetLineNumber(frame), cb_count, ret);
445
447
  self->handling = FALSE;
446
448
  Py_XDECREF(code_bytes_object);
447
449
 
@@ -603,7 +605,7 @@ done:
603
605
  static PyObject *
604
606
  CTracer_push_postop_callback(CTracer *self, PyObject *args)
605
607
  {
606
- PyObject *frame;
608
+ PyFrameObject *frame;
607
609
  PyObject *callback;
608
610
  if (!PyArg_ParseTuple(args, "OO", &frame, &callback)) {
609
611
  return NULL;
@@ -615,7 +617,8 @@ CTracer_push_postop_callback(CTracer *self, PyObject *args)
615
617
  }
616
618
  #endif
617
619
  Py_INCREF(callback);
618
- FrameAndCallback fcb = {frame, callback};
620
+ // TODO: if we add branching opcodes, there will be two possible next instruction locations:
621
+ FrameNextIandCallback fcb = {frame, PyFrame_GetLasti(frame) + 2, callback};
619
622
  push_framecb(&self->postop_callbacks, fcb);
620
623
  Py_RETURN_NONE;
621
624
  }
@@ -50,10 +50,11 @@ typedef struct HandlerTable {
50
50
  } HandlerTable;
51
51
 
52
52
 
53
- typedef struct FrameAndCallback {
54
- PyObject* frame;
53
+ typedef struct FrameNextIandCallback {
54
+ PyFrameObject* frame;
55
+ int expected_i;
55
56
  PyObject* callback;
56
- } FrameAndCallback;
57
+ } FrameNextIandCallback;
57
58
 
58
59
 
59
60
  typedef struct CodeAndStacks {
@@ -62,7 +63,7 @@ typedef struct CodeAndStacks {
62
63
  } CodeAndStacks;
63
64
 
64
65
 
65
- DEFINE_VEC(FrameAndCallbackVec, FrameAndCallback, init_framecbvec, push_framecb);
66
+ DEFINE_VEC(FrameNextIandCallbackVec, FrameNextIandCallback, init_framecbvec, push_framecb);
66
67
  DEFINE_VEC(ModuleVec, PyObject*, init_modulevec, push_module);
67
68
  DEFINE_VEC(TableVec, HandlerTable, init_tablevec, push_table_entry)
68
69
 
@@ -70,7 +71,7 @@ typedef struct CTracer {
70
71
  PyObject_HEAD
71
72
  ModuleVec modules;
72
73
  TableVec handlers;
73
- FrameAndCallbackVec postop_callbacks;
74
+ FrameNextIandCallbackVec postop_callbacks;
74
75
  BOOL enabled;
75
76
  BOOL handling;
76
77
  BOOL trace_all_opcodes;
@@ -1,4 +1,5 @@
1
1
  import importlib
2
+ import inspect
2
3
  import os
3
4
  import sys
4
5
  import traceback
@@ -28,9 +29,10 @@ def reject(event: str, args: Tuple) -> None:
28
29
 
29
30
 
30
31
  def inside_module(modules: Iterable[ModuleType]) -> bool:
31
- files = {m.__file__ for m in modules}
32
- for frame, lineno in traceback.walk_stack(None):
33
- if frame.f_code.co_filename in files:
32
+ """Checks whether the current call stack is inside one of the given modules."""
33
+ for frame, _lineno in traceback.walk_stack(None):
34
+ frame_module = inspect.getmodule(frame)
35
+ if frame_module and frame_module in modules:
34
36
  return True
35
37
  return False
36
38
 
@@ -60,7 +62,7 @@ def check_msvcrt_open(event: str, args: Tuple) -> None:
60
62
  _MODULES_THAT_CAN_POPEN: Optional[Set[ModuleType]] = None
61
63
 
62
64
 
63
- def modules_with_allowed_popen():
65
+ def modules_with_allowed_subprocess():
64
66
  global _MODULES_THAT_CAN_POPEN
65
67
  if _MODULES_THAT_CAN_POPEN is None:
66
68
  allowed_module_names = ("_aix_support", "ctypes", "platform", "uuid")
@@ -74,13 +76,14 @@ def modules_with_allowed_popen():
74
76
 
75
77
 
76
78
  def check_subprocess(event: str, args: Tuple) -> None:
77
- if not inside_module(modules_with_allowed_popen()):
79
+ if not inside_module(modules_with_allowed_subprocess()):
78
80
  reject(event, args)
79
81
 
80
82
 
81
83
  _SPECIAL_HANDLERS = {
82
84
  "open": check_open,
83
85
  "subprocess.Popen": check_subprocess,
86
+ "os.posix_spawn": check_subprocess,
84
87
  "msvcrt.open_osfhandle": check_msvcrt_open,
85
88
  }
86
89
 
@@ -267,7 +267,7 @@ class SymbolicValue(CrossHairValue):
267
267
  self.snapshot = SnapshotRef(-1)
268
268
  self.python_type = typ
269
269
  if type(smtvar) is str:
270
- self.var = self.__init_var__(typ, smtvar)
270
+ self.var: Any = self.__init_var__(typ, smtvar)
271
271
  else:
272
272
  self.var = smtvar
273
273
  # TODO test that smtvar's sort matches expected?
@@ -838,19 +838,6 @@ def setup_binops():
838
838
 
839
839
  setup_binop(_, {ops.lshift, ops.rshift})
840
840
 
841
- _AND_MASKS_TO_MOD = {
842
- # It's common to use & to mask low bits. We can avoid realization by converting
843
- # these situations into mod operations.
844
- 0x01: 2,
845
- 0x03: 4,
846
- 0x07: 8,
847
- 0x0F: 16,
848
- 0x1F: 32,
849
- 0x3F: 64,
850
- 0x7F: 128,
851
- 0xFF: 256,
852
- }
853
-
854
841
  def _(op: BinFn, a: Integral, b: Integral):
855
842
  with NoTracing():
856
843
  if isinstance(b, SymbolicInt):
@@ -861,9 +848,12 @@ def setup_binops():
861
848
  b = realize(b)
862
849
  if b == 0:
863
850
  return 0
864
- mask_mod = _AND_MASKS_TO_MOD.get(b)
865
- if mask_mod and isinstance(a, SymbolicInt):
866
- if context_statespace().smt_fork(a.var >= 0, probability_true=0.75):
851
+ # It's common to use & to mask low bits. We can avoid realization by converting
852
+ # these situations into mod operations.
853
+ mask_mod = b + 1
854
+ if b > 0 and mask_mod & b == 0 and isinstance(a, SymbolicInt): # type: ignore
855
+ space = context_statespace()
856
+ if space.smt_fork(a.var >= 0, probability_true=0.75):
867
857
  return SymbolicInt(a.var % mask_mod)
868
858
  else:
869
859
  return SymbolicInt(b - ((-a.var - 1) % mask_mod))
@@ -1435,6 +1425,10 @@ class PreciseIeeeSymbolicFloat(SymbolicFloat):
1435
1425
  # __hash__ has to be explicitly reassigned because we define __eq__
1436
1426
  __hash__ = SymbolicFloat.__hash__
1437
1427
 
1428
+ def __bool__(self):
1429
+ with NoTracing():
1430
+ return not SymbolicBool(z3.fpIsZero(self.var))
1431
+
1438
1432
  def __ne__(self, other):
1439
1433
  with NoTracing():
1440
1434
  coerced = type(self)._coerce_to_smt_sort(other)
@@ -85,7 +85,6 @@ from crosshair.util import (
85
85
  CrossHairValue,
86
86
  IgnoreAttempt,
87
87
  UnknownSatisfiability,
88
- set_debug,
89
88
  )
90
89
 
91
90
 
@@ -3618,18 +3617,29 @@ def test_deep_realization(space, typ):
3618
3617
  assert concrete == symbolic
3619
3618
 
3620
3619
 
3621
- def TODO_test_float_precision_issues(a, b):
3622
- # Does not yet work: floating point is modeled with infinite precision at the moment
3623
- def f(a: int, b: int):
3624
- """
3625
- pre: b !=0
3626
- post: a == b * _
3620
+ def test_float_round_to_zero(space):
3621
+ space.extra(ModelingDirector).global_representations[
3622
+ float
3623
+ ] = PreciseIeeeSymbolicFloat
3624
+ n = proxy_for_type(float, "n")
3625
+ d = proxy_for_type(float, "d")
3626
+ with ResumedTracing():
3627
+ space.add(d != 0.0)
3628
+ # This is possible for floats, but not reals:
3629
+ assert space.is_possible(n / d != 0.0)
3630
+ assert space.is_possible(n / d == 0.0)
3627
3631
 
3628
- Postcondition holds in a math-sense, but not when floating point precision
3629
- comes into play (e.g. it's false for 13 / 99)
3630
- """
3631
3632
 
3632
- return a / b
3633
+ def test_float_neg_zero_is_falsey(space):
3634
+ space.extra(ModelingDirector).global_representations[
3635
+ float
3636
+ ] = PreciseIeeeSymbolicFloat
3637
+ x = proxy_for_type(float, "x")
3638
+ with ResumedTracing():
3639
+ space.add(x == -10.0)
3640
+ negzero = x / math.inf
3641
+ assert not space.is_possible(negzero != 0.0)
3642
+ assert bool(negzero) is False
3633
3643
 
3634
3644
 
3635
3645
  def TODO_test_int_mod_float():
@@ -0,0 +1,18 @@
1
+ import copy
2
+ import datetime
3
+
4
+ from crosshair.core import proxy_for_type
5
+ from crosshair.statespace import StateSpace
6
+ from crosshair.tracers import ResumedTracing
7
+ from crosshair.util import debug
8
+
9
+
10
+ def test_date_copy(space: StateSpace) -> None:
11
+ concrete_date = datetime.date(2000, 2, 3)
12
+ symbolic_date = proxy_for_type(datetime.date, "d")
13
+ with ResumedTracing():
14
+ copied_symbolic = copy.deepcopy(symbolic_date)
15
+ copied_concrete = copy.deepcopy(concrete_date)
16
+ assert not space.is_possible(copied_concrete != concrete_date)
17
+ assert not space.is_possible(copied_concrete != datetime.date(2000, 2, 3))
18
+ assert not space.is_possible(copied_symbolic != symbolic_date)
@@ -855,7 +855,7 @@ class date:
855
855
 
856
856
  """
857
857
 
858
- def __init__(self, year, month, day):
858
+ def __init__(self, year, month=None, day=None):
859
859
  """
860
860
  Constructor.
861
861
 
@@ -863,7 +863,13 @@ class date:
863
863
  :param month: month, starting at 1
864
864
  :param day: day, starting at 1
865
865
  """
866
- year, month, day = _check_date_fields(year, month, day)
866
+ if month is None:
867
+ # We can receive a string/bytes single argument when unpickling a concrete date
868
+ with NoTracing():
869
+ dt = real_date(realize(year)) # type: ignore
870
+ year, month, day = dt.year, dt.month, dt.day
871
+ else:
872
+ year, month, day = _check_date_fields(year, month, day)
867
873
  self._year = year
868
874
  self._month = month
869
875
  self._day = day
@@ -515,7 +515,7 @@ def test_mypycrosshair_command():
515
515
  capture_output=True,
516
516
  text=True,
517
517
  )
518
- assert completion.stderr.strip() == ""
518
+ assert completion.stderr.strip() == "", f"stderr was '''{completion.stderr}'''"
519
519
  if completion.returncode != 1:
520
520
  print(completion.stdout)
521
521
  assert False, f"Return code was {completion.returncode}"
@@ -286,3 +286,19 @@ def test_identity_operator_does_not_realize_on_differing_types():
286
286
  fourty_two = 42 # assignment just to avoid lint errors
287
287
  b1 is fourty_two
288
288
  assert len(space.choices_made) == choices_made_at_start
289
+
290
+
291
+ class IExplodeOnRepr:
292
+ def __repr__(self):
293
+ raise ValueError("boom")
294
+
295
+
296
+ def test_postop_callback_skipped_on_exception_handler_jump(space):
297
+ with ResumedTracing():
298
+ elements = IExplodeOnRepr()
299
+ try:
300
+ ret = f"these are them: {elements!r}"
301
+ except ValueError: # pragma: no cover
302
+ ret = None
303
+ # need to do something(anything) with elements so that it's on the stack:
304
+ type(elements)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: crosshair-tool
3
- Version: 0.0.86
3
+ Version: 0.0.88
4
4
  Summary: Analyze Python code for correctness using symbolic execution.
5
5
  Home-page: https://github.com/pschanely/CrossHair
6
6
  Author: Phillip Schanely
@@ -46,7 +46,7 @@ Requires-Dist: pytest-xdist; extra == "dev"
46
46
  Requires-Dist: setuptools; extra == "dev"
47
47
  Requires-Dist: sphinx>=3.4.3; extra == "dev"
48
48
  Requires-Dist: sphinx-rtd-theme>=0.5.1; extra == "dev"
49
- Requires-Dist: wheel; extra == "dev"
49
+ Requires-Dist: rst2pdf>=0.102; extra == "dev"
50
50
  Dynamic: author
51
51
  Dynamic: author-email
52
52
  Dynamic: classifier
@@ -113,6 +113,7 @@ crosshair/libimpl/collectionslib.py
113
113
  crosshair/libimpl/collectionslib_ch_test.py
114
114
  crosshair/libimpl/collectionslib_test.py
115
115
  crosshair/libimpl/copylib.py
116
+ crosshair/libimpl/copylib_test.py
116
117
  crosshair/libimpl/datetimelib.py
117
118
  crosshair/libimpl/datetimelib_ch_test.py
118
119
  crosshair/libimpl/datetimelib_test.py
@@ -19,7 +19,7 @@ pytest-xdist
19
19
  setuptools
20
20
  sphinx>=3.4.3
21
21
  sphinx-rtd-theme>=0.5.1
22
- wheel
22
+ rst2pdf>=0.102
23
23
 
24
24
  [dev:python_version < "3.12"]
25
25
  numpy==1.23.4
@@ -14,7 +14,7 @@ from setuptools import Extension, find_packages, setup # type: ignore
14
14
  # the pre-commit checks through check_init_and_setup_coincide.py.
15
15
  setup(
16
16
  name="crosshair-tool",
17
- version="0.0.86", # Update this in crosshair/__init__.py too
17
+ version="0.0.88", # Update this in crosshair/__init__.py too
18
18
  author="Phillip Schanely",
19
19
  author_email="pschanely+vE7F@gmail.com",
20
20
  ext_modules=[
@@ -65,7 +65,7 @@ setup(
65
65
  "setuptools",
66
66
  "sphinx>=3.4.3",
67
67
  "sphinx-rtd-theme>=0.5.1",
68
- "wheel",
68
+ "rst2pdf>=0.102",
69
69
  ]
70
70
  },
71
71
  classifiers=[
File without changes