mirror of
git://git.code.sf.net/p/sbcl/sbcl
synced 2026-09-10 07:26:40 -04:00
Unless a binary is linked with -zwxneeded and run from a filesystem mounted with -o wxallowed then no page may have both the PROT_EXEC and PROT_WRITE protections.
11 lines
197 B
C
11 lines
197 B
C
#include <sys/mman.h>
|
|
|
|
int
|
|
main()
|
|
{
|
|
if (mmap(0, 1, PROT_EXEC|PROT_READ|PROT_WRITE,
|
|
MAP_PRIVATE|MAP_ANON, -1, 0) == MAP_FAILED)
|
|
return 1;
|
|
return 0;
|
|
}
|