Details
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
| lib/libc/gen/posix_spawn.c | ||
|---|---|---|
| 306 | What would prevent us from being able to map over the guard here? I wonder if this should be an assert instead. | |
The cost is +3 syscalls per spawn, but so be it.
| lib/libc/gen/posix_spawn.c | ||
|---|---|---|
| 306 | I dislike asserts in libraries. It is not the library authors to establish the assert policy for the caller. The check is mostly for correctness. If I somehow missed the correct args to mmap, I can see it immediately. | |
I think it's defensible for the benefit of the guard page. Worst case scenario, we add a small pool of free stacks to choose from if we get complaints? A little bit of additional complexity, but not terrible.
| lib/libc/gen/posix_spawn.c | ||
|---|---|---|
| 306 | Right, but in this case we're presumably hiding a kernel bug if it does actually fail at this particular point, which feels like a reasonable exception to make for assertions in libraries. I don't insist either way, though. | |