fix(core): surrogate handling, markers in app context, and memory leak
Fixes #10615 (surrogate handling, km_core_state_context_set_if_needed). Fixes #10616 (markers in app context, in unit tests) Fixes #10617 (memory leak in replace_context). The surrogate handling and markers in app context bugs were quite tangled, so opted to fix those both together in one commit. The memory leak was spotted while verifying the changes for surrogate handling. Surrogates were not handled in is_context_unchanged, and opted to refactor to work directly with km_core_context_item arrays rather than continue with the string-based comparison, for simplicity. While writing the corresponding unit tests, realised that the app_context checks were incorrect in a number of existing tests, and so fixed up the existing tests at the same time as writing up the new tests. The only changes to core for this were to add assertions for the app_context to ensure that markers are not inadvertently added.
parent
9e50f506
Please register or sign in to comment