Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
GHC
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Yiming Yang
GHC
Commits
2d0131da
Commit
2d0131da
authored
16 years ago
by
Ian Lynagh
Browse files
Options
Downloads
Patches
Plain Diff
Fix a division-by-zero when +RTS -V0 is given
In delayzh_fast we act as if tickInterval was 50, not 0.
parent
b84b5969
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
rts/PrimOps.cmm
+5
-1
5 additions, 1 deletion
rts/PrimOps.cmm
with
5 additions
and
1 deletion
rts/PrimOps.cmm
+
5
−
1
View file @
2d0131da
...
...
@@ -2118,7 +2118,11 @@ delayzh_fast
W_
time
;
W_
divisor
;
(
time
)
=
foreign
"
C
"
getourtimeofday
()
[
R1
];
divisor
=
TO_W_
(
RtsFlags_MiscFlags_tickInterval
(
RtsFlags
))
*
1000
;
divisor
=
TO_W_
(
RtsFlags_MiscFlags_tickInterval
(
RtsFlags
));
if
(
divisor
==
0
)
{
divisor
=
50
;
}
divisor
=
divisor
*
1000
;
target
=
((
R1
+
divisor
-
1
)
/
divisor
)
/* divide rounding up */
+
time
+
1
;
/* Add 1 as getourtimeofday rounds down */
StgTSO_block_info
(
CurrentTSO
)
=
target
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment