harness-revert-null-divert-kept-counters

This commit is contained in:
SashegDev
2026-09-16 06:08:18 +00:00
parent 1d26bce415
commit f18ead1f51
+3 -3
View File
@@ -491,8 +491,9 @@ def main():
_nulllog.append((count[0], r, lr, sp))
if _halt_on_null and len(_nulllog) == 1:
return False
# fresh blx (lr just set by link) -> maze; stale bx/pop (lr garbage)
# -> poll-resumption (kills maze->sbl_mid hijack, PBL contract).
# fresh blx -> maze; stale bx/pop ALSO -> maze for now: the
# poll-resumption divert trapped execution in a 55-pc attractor
# (proven by 271M flat trail). Stale counted separately.
try:
_hp = hist[-2][0] if len(hist) >= 2 else -1
_ph = struct.unpack('<H', mu.mem_read(_hp & ~1, 2))[0] if _hp >= 0 else 0
@@ -505,7 +506,6 @@ def main():
_hp2 = hist[-2][0] if len(hist) >= 2 else -1
_hp1 = hist[-1][0] if len(hist) >= 1 else -1
_nsrc[(_hp2, _hp1)] = _nsrc.get((_hp2, _hp1), 0) + 1
mu.reg_write(_LR, 0x8007779)
mu.reg_write(_PC, STUB + 1)
mu.hook_add(UC_HOOK_CODE, hook_null, begin=0x0, end=0xFFF)