View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
---|---|---|---|---|---|---|---|---|---|
0000314 | mercury | Bug | public | 2014-01-30 18:25 | 2014-04-22 16:56 | ||||
Reporter | zs | ||||||||
Assigned To | zs | ||||||||
Priority | normal | Severity | major | Reproducibility | always | ||||
Status | closed | Resolution | fixed | ||||||
Product Version | |||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0000314: macros creating temporary frames for det & nondet stack ignore the need for new stack segments | ||||||||
Description | The code inside #ifdef MR_STACK_SEGMENTS in runtime/mercury_stacks.h only considers the main stack frames on the det and nondet stacks, the ones we allocate at procedure entry. The temporary frames we allocate later in procedure bodies use macros that check for overflow, but do NOT allocate new segments if the allocation does not in fact fit in the current stack segment. A minor problem is that the implications of stack segments for the handling of failures is not documented in compiler/notes/failure.html. | ||||||||
Steps To Reproduce | For me, the attached program, when compiled in grade asm_fast.gc.debug.stseg, will work when invoked as "bug302 1012" but not "bug302 1013". The numbers may be different in other machines, but should exist on all. | ||||||||
Tags | No tags attached. | ||||||||
Attached Files |
|
![]() |
|
pbone (administrator) 2014-01-31 10:16 |
Is it valid to create a new segment for a temporary frame? If i understand temporary frames correctly they belong to real frames. Can the temporary frame belong on a different segment from it's real frame? Thanks. |
zs (developer) 2014-01-31 14:18 |
Temp frames do have a redofr slot to go with the redoip slot; curfr is set from the redofr slot when backtracking to the redoip address. This SHOULD make it possible to have a temp frame on a different segment than the main frame of the relevant procedure, but the details are NOT obvious. Also, any fix should also work for det temp frames. We will need a new test case for that, and since det temp frames are rare, creating that test case won't be easy either. |
zs (developer) 2014-04-22 16:56 |
Fix committed april 18. |
![]() |
|||
Date Modified | Username | Field | Change |
---|---|---|---|
2014-01-30 18:25 | zs | New Issue | |
2014-01-30 18:25 | zs | File Added: bug302.m | |
2014-01-31 10:16 | pbone | Note Added: 0000634 | |
2014-01-31 14:18 | zs | Note Added: 0000635 | |
2014-02-17 13:25 | zs | Assigned To | => zs |
2014-02-17 13:25 | zs | Status | new => assigned |
2014-04-22 16:56 | zs | Note Added: 0000661 | |
2014-04-22 16:56 | zs | Status | assigned => closed |
2014-04-22 16:56 | zs | Resolution | open => fixed |