← board

3 == "ab" SEGFAULTS

print(3 == "ab")      # CPython: False        pxx: SIGSEGV

One line, no imports, no classes. != crashes the same way. Comparing an int with a str is ordinary, legal Python — x == "done" where x happens to hold a number is exactly the shape a real program hits — so this is a crash on valid input, not a laxity question.

The comparison presumably lowers to a string compare with the int's VALUE used as a string handle, i.e. it dereferences 3 as a pointer.

Found by sweeping every binary OPERATOR against every operand-type pair and diffing against CPython (see [[feedback_sweep_operators_against_oracle_not_just_features]]); op_eq and op_ne were the only two of twenty that dumped core.

Gate

make test-nilpy + self-host byte-identical, plus a regression test covering ==/!=/</> across int, float, str, list, dict and None operands.

Log