{"record":{"id":"e5bf1ef7e42441c7","repo":"sqlmapproject/sqlmap","slug":"host-code-failed-final-equality","errorCode":null,"errorMessage":"host code failed final equality","messagePattern":"host code failed final equality","errorType":"exception","errorClass":"OracleUndecided","httpStatus":null,"severity":"error","filePath":"extra/esperanto/engine.py","lineNumber":161,"sourceCode":"\n        def read(pos):\n            mode = strategy.compare_mode\n            if mode == \"code\":\n                code = strategy.renderCode(expr, pos)\n                top = 0x10FFFF\n                for cap in (127, 255, 0xFFFF, 0x10FFFF):\n                    if not ask(strategy.renderGt(code, cap, HUGE)):\n                        top = cap\n                        break\n                a, b = 0, top\n                while a < b:\n                    m = (a + b) // 2\n                    a, b = (m + 1, b) if ask(strategy.renderGt(code, m, HUGE)) else (a, m)\n                # FINAL EQUALITY on the code: comparator semantics are INDEPENDENT of the code\n                # fn's semantics, so a '>'->'>=' rewrite on the code expression converges off-by-\n                # one even when the code fn is codepoint-faithful. Confirm directly, else fail.\n                if not ask(\"(%s)=%d\" % (code, a)):\n                    raise OracleUndecided(\"host code failed final equality\")\n                return _unichr(a)\n            if mode in (\"collation\", \"ordinal\"):\n                cs = _PRINTABLE_SORTED\n                a, b = 0, len(cs) - 1\n                while a < b:\n                    m = (a + b) // 2\n                    a, b = (m + 1, b) if ask(strategy.renderCharCmp(expr, pos, cs[m], \">\")) else (a, m)\n                return cs[a]\n            for ch in _FREQ_ORDER:                          # equality scan\n                if ask(strategy.renderCharCmp(expr, pos, ch, \"=\")):\n                    return ch\n            return _REPL\n\n        value = \"\".join(read(i) for i in range(1, length + 1))\n        warns = [\"contains unresolved char\"] if _REPL in value else []\n        if strategy.compare_mode == \"equality-ci\":\n            warns.append(\"lossy equality collation: case/accents ambiguous\")\n        # WHOLE-VALUE verification: mirrors the native verify. Run it regardless of code-point","sourceCodeStart":143,"sourceCodeEnd":179,"githubUrl":"https://github.com/sqlmapproject/sqlmap/blob/0a35b20e3953d341be6c7ac75ccb0b3362540c8d/extra/esperanto/engine.py#L143-L179","documentation":"Error \"host code failed final equality\" thrown in sqlmapproject/sqlmap.","triggerScenarios":"Thrown at extra/esperanto/engine.py:161 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"0a35b20e3953d341be6c7ac75ccb0b3362540c8d","analyzedAt":"2026-08-26T23:02:52.002Z","schemaVersion":2},"datasetVersion":"2026-08-27T03:17:27.898Z"}