Page MenuHomeFreeBSD

munmap.2: Unaligned addresses do not return error
ClosedPublic

Authored by emaste on Wed, Jan 15, 4:55 PM.
Tags
None
Referenced Files
F107810073: D48465.diff
Sat, Jan 18, 8:58 AM
F107797991: D48465.id149301.diff
Sat, Jan 18, 6:54 AM
F107786124: D48465.diff
Sat, Jan 18, 4:49 AM
Unknown Object (File)
Wed, Jan 15, 6:18 PM

Details

Summary
We previously claimed that non-page-aligned addresses would return
EINVAL, but the address is in fact rounded down to the page boundary.

Fixes: dabee6fecc67 ("kern_descrip.c: add fdshare()/fdcopy()")

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

emaste created this revision.

Turn reference into a link: rGdabee6fecc67

Hm, this used to be required by POSIX but newer versions allow the implementation not to treat that as an error

brooks added a subscriber: brooks.

Ideally I'd like to see a note that the use of unaligned addresses is non-portable, but that's probably a separate commit.

This revision is now accepted and ready to land.Wed, Jan 15, 5:52 PM