diff options
| author | Paul Buetow <paul@buetow.org> | 2026-05-29 22:15:30 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-05-29 22:15:30 +0300 |
| commit | 6a73390713c5248a1ea1cf0baa223afcee64fd01 (patch) | |
| tree | 2b1a64ebb7a009be403ef836dab1f4ef1de7637e /tools | |
| parent | 9bd6ed5a7d40ff922a344ab636f804f1c9bb1f12 (diff) | |
test(remap_file_pages): harden mem handler lock-in test
Audit of remap_file_pages(2): int remap_file_pages(void *addr,
size_t size, int prot, size_t pgoff, int flags). The implementation
was already correct (KindMem, FamilyMemory, addr=args[0],
length=args[1], length2=pgoff=args[3], flags=args[4]), but the
lock-in test was thinner than its madvise/mincore/munlock siblings.
Strengthen TestGenerateMemHandlerRemapFilePages to:
- negative-assert flags is never read from args[2] (prot, always 0)
or args[0] (addr), guarding the prot/flags index hazard
- verify the exit handler captures the int 0/-1 status generically as
UNCLASSIFIED, like every other KindMem exit
- document the wiring and the prot-vs-flags pitfall in the comment
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Diffstat (limited to 'tools')
0 files changed, 0 insertions, 0 deletions
