Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
jberryman
GHC
Commits
c681514a
Commit
c681514a
authored
Mar 20, 2009
by
mad.one@gmail.com
Browse files
wibble in setExecutable
parent
97c4b274
Changes
2
Hide whitespace changes
Inline
Side-by-side
rts/posix/OSMem.c
View file @
c681514a
...
...
@@ -237,6 +237,6 @@ void setExecutable (void *p, lnat len, rtsBool exec)
StgWord
size
=
startOfLastPage
-
startOfFirstPage
+
pageSize
;
if
(
mprotect
((
void
*
)
startOfFirstPage
,
(
size_t
)
size
,
(
exec
?
PROT_EXEC
:
0
)
|
PROT_READ
|
PROT_WRITE
)
!=
0
)
{
barf
(
"
make
Executable: failed to protect 0x%p
\n
"
,
p
);
barf
(
"
set
Executable: failed to protect 0x%p
\n
"
,
p
);
}
}
rts/win32/OSMem.c
View file @
c681514a
...
...
@@ -255,7 +255,7 @@ void setExecutable (void *p, lnat len, rtsBool exec)
exec
?
PAGE_EXECUTE_READWRITE
:
PAGE_READWRITE
,
&
dwOldProtect
)
==
0
)
{
sysErrorBelch
(
"
make
Executable: failed to protect 0x%p; old protection: %lu
\n
"
,
sysErrorBelch
(
"
set
Executable: failed to protect 0x%p; old protection: %lu
\n
"
,
p
,
(
unsigned
long
)
dwOldProtect
);
stg_exit
(
EXIT_FAILURE
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment