Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
Alex D
GHC
Commits
3bebf3c2
Commit
3bebf3c2
authored
Nov 04, 2014
by
Simon Marlow
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix a couple of inaccurate stack checks
parent
4cd277b4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
rts/Apply.cmm
rts/Apply.cmm
+6
-3
No files found.
rts/Apply.cmm
View file @
3bebf3c2
...
...
@@ -70,7 +70,7 @@ stg_PAP_apply /* no args => explicit stack */
// We have a hand-rolled stack check fragment here, because none of
// the canned ones suit this situation.
//
if
(
(
Sp
-
WDS
(
Words
))
<
SpLim
)
{
if
(
Sp
-
(
WDS
(
Words
)
+
2
/* see ARG_BCO below */
)
<
SpLim
)
{
// there is a return address in R2 in the event of a
// stack check failure. The various stg_apply functions arrange
// this before calling stg_PAP_entry.
...
...
@@ -168,7 +168,9 @@ INFO_TABLE(stg_AP,/*special layout*/0,0,AP,"AP","AP")
* closure, in which case we must enter the blackhole on return rather
* than continuing to evaluate the now-defunct closure.
*/
STK_CHK_ENTER
(
WDS
(
Words
)
+
SIZEOF_StgUpdateFrame
,
R1
);
STK_CHK_ENTER
(
WDS
(
Words
)
+
SIZEOF_StgUpdateFrame
+
2
/* see ARG_BCO below */
,
R1
);
PUSH_UPD_FRAME
(
Sp
-
SIZEOF_StgUpdateFrame
,
R1
);
Sp
=
Sp
-
SIZEOF_StgUpdateFrame
-
WDS
(
Words
);
...
...
@@ -239,7 +241,8 @@ INFO_TABLE(stg_AP_NOUPD,/*special layout*/0,0,AP,"AP_NOUPD","AP_NOUPD")
* closure, in which case we must enter the blackhole on return rather
* than continuing to evaluate the now-defunct closure.
*/
STK_CHK_ENTER
(
WDS
(
Words
),
R1
);
STK_CHK_ENTER
(
WDS
(
Words
)
+
2
/* see ARG_BCO below */
,
R1
);
Sp
=
Sp
-
WDS
(
Words
);
TICK_ENT_AP
();
...
...
Write
Preview
Markdown
is supported
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