crosshair-tool 0.0.87__cp312-cp312-musllinux_1_2_i686.whl → 0.0.88__cp312-cp312-musllinux_1_2_i686.whl
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.
- _crosshair_tracers.cpython-312-i386-linux-musl.so +0 -0
- crosshair/__init__.py +1 -1
- crosshair/_tracers.h +6 -5
- crosshair/libimpl/builtinslib.py +4 -0
- crosshair/libimpl/builtinslib_test.py +21 -11
- crosshair/libimpl/copylib_test.py +18 -0
- crosshair/libimpl/datetimelib.py +8 -2
- crosshair/main_test.py +1 -1
- crosshair/opcode_intercept_test.py +16 -0
- {crosshair_tool-0.0.87.dist-info → crosshair_tool-0.0.88.dist-info}/METADATA +1 -1
- {crosshair_tool-0.0.87.dist-info → crosshair_tool-0.0.88.dist-info}/RECORD +15 -14
- {crosshair_tool-0.0.87.dist-info → crosshair_tool-0.0.88.dist-info}/WHEEL +0 -0
- {crosshair_tool-0.0.87.dist-info → crosshair_tool-0.0.88.dist-info}/entry_points.txt +0 -0
- {crosshair_tool-0.0.87.dist-info → crosshair_tool-0.0.88.dist-info}/licenses/LICENSE +0 -0
- {crosshair_tool-0.0.87.dist-info → crosshair_tool-0.0.88.dist-info}/top_level.txt +0 -0
|
Binary file
|
crosshair/__init__.py
CHANGED
|
@@ -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.
|
|
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"
|
crosshair/_tracers.h
CHANGED
|
@@ -50,10 +50,11 @@ typedef struct HandlerTable {
|
|
|
50
50
|
} HandlerTable;
|
|
51
51
|
|
|
52
52
|
|
|
53
|
-
typedef struct
|
|
54
|
-
|
|
53
|
+
typedef struct FrameNextIandCallback {
|
|
54
|
+
PyFrameObject* frame;
|
|
55
|
+
int expected_i;
|
|
55
56
|
PyObject* callback;
|
|
56
|
-
}
|
|
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(
|
|
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
|
-
|
|
74
|
+
FrameNextIandCallbackVec postop_callbacks;
|
|
74
75
|
BOOL enabled;
|
|
75
76
|
BOOL handling;
|
|
76
77
|
BOOL trace_all_opcodes;
|
crosshair/libimpl/builtinslib.py
CHANGED
|
@@ -1425,6 +1425,10 @@ class PreciseIeeeSymbolicFloat(SymbolicFloat):
|
|
|
1425
1425
|
# __hash__ has to be explicitly reassigned because we define __eq__
|
|
1426
1426
|
__hash__ = SymbolicFloat.__hash__
|
|
1427
1427
|
|
|
1428
|
+
def __bool__(self):
|
|
1429
|
+
with NoTracing():
|
|
1430
|
+
return not SymbolicBool(z3.fpIsZero(self.var))
|
|
1431
|
+
|
|
1428
1432
|
def __ne__(self, other):
|
|
1429
1433
|
with NoTracing():
|
|
1430
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
|
|
3622
|
-
|
|
3623
|
-
|
|
3624
|
-
|
|
3625
|
-
|
|
3626
|
-
|
|
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
|
-
|
|
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)
|
crosshair/libimpl/datetimelib.py
CHANGED
|
@@ -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
|
-
|
|
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
|
crosshair/main_test.py
CHANGED
|
@@ -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,9 +1,9 @@
|
|
|
1
|
-
_crosshair_tracers.cpython-312-i386-linux-musl.so,sha256=
|
|
2
|
-
crosshair/__init__.py,sha256=
|
|
1
|
+
_crosshair_tracers.cpython-312-i386-linux-musl.so,sha256=URfC-YvzPEu8evvq23LKMFZn_taXt1ai_XjKGpnxSlE,84948
|
|
2
|
+
crosshair/__init__.py,sha256=SSP_9GXeo_0ypAR-f-Zt32yVGvXY3tEY9SWKDgy_m_A,936
|
|
3
3
|
crosshair/__main__.py,sha256=zw9Ylf8v2fGocE57o4FqvD0lc7U4Ld2GbeCGxRWrpqo,252
|
|
4
4
|
crosshair/_mark_stacks.h,sha256=j86qubOUvVhoR19d74iQ084RrTEq8M6oT4wJsGQUySY,28678
|
|
5
5
|
crosshair/_preliminaries_test.py,sha256=r2PohNNMfIkDqsnvI6gKlJTbwBaZA9NQJueQfJMN2Eo,504
|
|
6
|
-
crosshair/_tracers.h,sha256=
|
|
6
|
+
crosshair/_tracers.h,sha256=QFBklLqMWmIpUzBIn_A4SKdpjwHs-N7ttx-F5jtWWCQ,2174
|
|
7
7
|
crosshair/_tracers_pycompat.h,sha256=6IYnbQxrYkhBsLDAHSX25DPOwo1oYHCZUVWZ8c7YCnQ,14356
|
|
8
8
|
crosshair/_tracers_test.py,sha256=KpCGspjOUeZuhwTYgn_RxI4M4wMbT5rldusFDgneQ6M,3596
|
|
9
9
|
crosshair/abcstring.py,sha256=ROU8LzS7kfEU2L_D3QfhVxIjrYr1VctwUWfylC7KlCc,6549
|
|
@@ -32,11 +32,11 @@ crosshair/fuzz_core_test.py,sha256=q7WsZt6bj5OJrXaVsT3JaRYWWnL8X_1flSfty4Z7CcA,1
|
|
|
32
32
|
crosshair/lsp_server.py,sha256=j7SX4pdVwa2MrtkNIjajLilzl5CZTY6PrBQsa26cdNo,8670
|
|
33
33
|
crosshair/lsp_server_test.py,sha256=7LO1Qqxkper3Xt2krgOlGqF1O_uDObo76o4FZbIqykY,969
|
|
34
34
|
crosshair/main.py,sha256=6RXjj1FIyBK6i6xOx-bs-CsHLgOZcc9hL3U1JRwxpA0,34378
|
|
35
|
-
crosshair/main_test.py,sha256=
|
|
35
|
+
crosshair/main_test.py,sha256=eEoK4LHKSaX-6iJx3tAVbwCaBJc0ri3VoCPtLD5em2U,14424
|
|
36
36
|
crosshair/objectproxy.py,sha256=Uc6mNkJBInvETGWBHI10GSNEIrBYDIxlAZ30M3PAIhQ,8935
|
|
37
37
|
crosshair/objectproxy_test.py,sha256=KykRJLSHCDA7jb_XPBDhXHnS6Q1fG4oIJ579CeSEz3k,567
|
|
38
38
|
crosshair/opcode_intercept.py,sha256=z4Yb9prYE2UK21AxhjAeXyXAk5IriDuCSSCeNhbDu2A,21880
|
|
39
|
-
crosshair/opcode_intercept_test.py,sha256=
|
|
39
|
+
crosshair/opcode_intercept_test.py,sha256=Si3rJQR5cs5d4uB8uwE2K8MjP8rE1a4yHkjXzhfS10A,9241
|
|
40
40
|
crosshair/options.py,sha256=htQNgnrpoRjSNq6rfLBAF8nos-NNIwmP6tQYyI8ugsM,6775
|
|
41
41
|
crosshair/options_test.py,sha256=lzA-XtwEwQPa4wV1wwhCRKhyLOvIhThU9WK5QRaRbxQ,379
|
|
42
42
|
crosshair/patch_equivalence_test.py,sha256=mvYpsbHZS2AiQra-jK8T8QywAG1gNNCUNQPPWI9k5t8,2506
|
|
@@ -100,16 +100,17 @@ crosshair/libimpl/binascii_ch_test.py,sha256=hFqSfF1Q8jl2LNBIWaQ6vBJIIshPOmSwrR0
|
|
|
100
100
|
crosshair/libimpl/binascii_test.py,sha256=LOBqLAJ77Kx8vorjVTaT3X0Z93zw4P5BvwUapMCiSLg,1970
|
|
101
101
|
crosshair/libimpl/binasciilib.py,sha256=9w4C37uxRNOmz9EUuhJduHlMKn0f7baY5fwwdvx1uto,5070
|
|
102
102
|
crosshair/libimpl/bisectlib_test.py,sha256=ZQtYmBYD0Pb1IiFelsgdvqyeUMKaqaDb1BRb87LTSbI,753
|
|
103
|
-
crosshair/libimpl/builtinslib.py,sha256=
|
|
103
|
+
crosshair/libimpl/builtinslib.py,sha256=0NRP8l_weL0kh050cOKMrqK8y-glh3NySYLJYjdHVz8,171622
|
|
104
104
|
crosshair/libimpl/builtinslib_ch_test.py,sha256=W4wWapqlxSjsC5XgREfgxS9e_iwKxgNQhbFE3umUfNI,30504
|
|
105
|
-
crosshair/libimpl/builtinslib_test.py,sha256=
|
|
105
|
+
crosshair/libimpl/builtinslib_test.py,sha256=Y_jRe5J6pPaJ_Nuk1lJ1biP5yczsfCj--NgNhwcbAfQ,90654
|
|
106
106
|
crosshair/libimpl/codecslib.py,sha256=lB87T1EYSBh4JXaqzjSpQG9CMfKtgckwA7f6OIR0S-Q,2668
|
|
107
107
|
crosshair/libimpl/codecslib_test.py,sha256=8K64njhxnTe7qLh-_onARNsm_qSG7BWM5dXgADYi54A,2536
|
|
108
108
|
crosshair/libimpl/collectionslib.py,sha256=VuDIOUOGORiUT9J0tDVECr6oC-yUR3WAiFnMeVGzi-o,8583
|
|
109
109
|
crosshair/libimpl/collectionslib_ch_test.py,sha256=PYitnmXXEZfm25FzBodEX1hOpwqnDspbqt5aqzeVar0,5855
|
|
110
110
|
crosshair/libimpl/collectionslib_test.py,sha256=3h7XTToKWauMhjrEwLXVI0jT8FZKBlkvlw0oiPMmuKM,9164
|
|
111
111
|
crosshair/libimpl/copylib.py,sha256=icHJWeFK_tsPSdJhvlS5fVcBwlh0uJh0nzXsRJCGtzs,527
|
|
112
|
-
crosshair/libimpl/
|
|
112
|
+
crosshair/libimpl/copylib_test.py,sha256=VpS9ICvIjzKw0kccsl1v5FB1chHHEIWdOAerEQ_pGMw,705
|
|
113
|
+
crosshair/libimpl/datetimelib.py,sha256=kVWcoHMX-dPW-un7XoEIURfWlVOst6h_JFmjrhFiE1U,79168
|
|
113
114
|
crosshair/libimpl/datetimelib_ch_test.py,sha256=r_V9H34a4POlEeffi46mEtVI9ek80DHaEOiCTKON9Us,9283
|
|
114
115
|
crosshair/libimpl/datetimelib_test.py,sha256=v9Cg512AXIGy7_dsN2y_ZD7W7fqfSSz07eiCUZukM60,2659
|
|
115
116
|
crosshair/libimpl/decimallib.py,sha256=zBKDrDZcg45oCKUkf6SIDuVpjA1Web7tD1MEQo5cjxI,177348
|
|
@@ -166,9 +167,9 @@ crosshair/tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
|
166
167
|
crosshair/tools/check_help_in_doc.py,sha256=P21AH3mYrTVuBgWD6v65YXqBqmqpQDUTQeoZ10rB6TU,8235
|
|
167
168
|
crosshair/tools/check_init_and_setup_coincide.py,sha256=kv61bXqKSKF_5J-kLNEhCrCPyszg7iZQWDu_Scnec98,3502
|
|
168
169
|
crosshair/tools/generate_demo_table.py,sha256=0SeO0xQdiT-mbLNHt4rYL0wcc2DMh0v3qtzBdoQonDk,3831
|
|
169
|
-
crosshair_tool-0.0.
|
|
170
|
-
crosshair_tool-0.0.
|
|
171
|
-
crosshair_tool-0.0.
|
|
172
|
-
crosshair_tool-0.0.
|
|
173
|
-
crosshair_tool-0.0.
|
|
174
|
-
crosshair_tool-0.0.
|
|
170
|
+
crosshair_tool-0.0.88.dist-info/METADATA,sha256=fb65F1neoaCfY1YaRda8cocX3gOjjCWW5it7Xn2DXto,6726
|
|
171
|
+
crosshair_tool-0.0.88.dist-info/WHEEL,sha256=Vuwis_LWaa45QUuJ2qqSgABfO0elv3qQohyjTF3DnPc,110
|
|
172
|
+
crosshair_tool-0.0.88.dist-info/entry_points.txt,sha256=u5FIPVn1jqn4Kzg5K_iNnbP6L4hQw5FWjQ0UMezG2VE,96
|
|
173
|
+
crosshair_tool-0.0.88.dist-info/top_level.txt,sha256=2jLWtM-BWg_ZYNbNfrcds0HFZD62a6J7ZIbcgcQrRk4,29
|
|
174
|
+
crosshair_tool-0.0.88.dist-info/RECORD,,
|
|
175
|
+
crosshair_tool-0.0.88.dist-info/licenses/LICENSE,sha256=NVyMvNqn1pH6RSHs6RWRcJyJvORnpgGFBlF73buqYJ0,4459
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|