We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 44e4c47 commit 0fad284Copy full SHA for 0fad284
Include/cpython/pystats.h
@@ -31,7 +31,7 @@
31
32
#define PYSTATS_MAX_UOP_ID 512
33
34
-#define SPECIALIZATION_FAILURE_KINDS 50
+#define SPECIALIZATION_FAILURE_KINDS 60
35
36
/* Stats for determining who is calling PyEval_EvalFrame */
37
#define EVAL_CALL_TOTAL 0
Python/specialize.c
@@ -440,7 +440,9 @@ _Py_PrintSpecializationStats(int to_file)
440
#define SPECIALIZATION_FAIL(opcode, kind) \
441
do { \
442
if (_Py_stats) { \
443
- _Py_stats->opcode_stats[opcode].specialization.failure_kinds[kind]++; \
+ int _kind = (kind); \
444
+ assert(_kind < SPECIALIZATION_FAILURE_KINDS); \
445
+ _Py_stats->opcode_stats[opcode].specialization.failure_kinds[_kind]++; \
446
} \
447
} while (0)
448
0 commit comments