v2.2.1
What's changed
A patch release with one library fix, on macOS again — and the CI change that found it. v2.2.0 noted that the macOS suites had never run in CI because the platform was not in the matrix. It is now, which is how this one surfaced within a day.
Fixed
-
macOS: a scan no longer gives up on a range the kernel refuses to hand over.
mach_vm_read_overwritereturningKERN_PROTECTION_FAILURE(kr=2) aborted the whole sweep, discarding every region after it — a plainsearch_by_valueover a live process could die part-way through. This is the same shape as the kr=10 fix in v2.2.0, but it is deliberately not the same fix: kr=2 stays fatal forsearch_by_addresses, whose documentedraise_error=Truemust still be able to report an address it could not read. Only the two full-address-space sweeps —search_by_valueandsearch_by_pattern— skip such a range, because they walk every region the filter accepted and hold no opinion about any single one. A range the kernel will not hand over is a range with no matches in it (#92)Worth stating plainly: why the kernel answers kr=2 on a region that reports
VM_PROT_READandShared=Falseis not established. It was observed on GitHub's virtualized macOS runners and does not reproduce on local hardware — probing every scannable region of a live process yields only kr=1 and kr=10, and a page deliberately re-protected toPROT_NONEanswersKERN_INVALID_ADDRESS, so the obvious "protection changed under us" explanation is ruled out rather than confirmed. The fix is scoped to what the behaviour warrants and the code says so.
Changed
- CI runs a macOS cell, so all three backends are measured. Coverage in the merged Codecov report went from 71% to 89% — not because the code became better tested, but because it is finally being measured: the
macospackage went from 7.3% to 85.8%, having previously counted as almost entirely uncovered. The Linux and Windows cells keep the full 3.10–3.13 sweep; macOS runs one cell, with NumPy, which is what keeps it in the same wall-clock range as the others (#92) - A coverage badge in the README and the docs landing page (#91), and the platform line moved below the badge row (#93)
Install
pip install --upgrade PyMemoryEditor📖 Full documentation: pymemoryeditor.readthedocs.io
Full Changelog: v2.2.0...v2.2.1