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 69a6e7b commit d7c1403Copy full SHA for d7c1403
Include/internal/pycore_code.h
@@ -288,7 +288,7 @@ extern int _PyStaticCode_Init(PyCodeObject *co);
288
#define OPT_HIST(length, name) \
289
do { \
290
if (_Py_stats) { \
291
- int bucket = _Py_bit_length(length - 1); \
+ int bucket = _Py_bit_length(length >= 1 ? length - 1 : 0); \
292
bucket = (bucket >= _Py_UOP_HIST_SIZE) ? _Py_UOP_HIST_SIZE - 1 : bucket; \
293
_Py_stats->optimization_stats.name[bucket]++; \
294
} \
0 commit comments