RSIM Bug Report #12
Version of RSIM | 1.0 |
Bug number | 12 |
Bug class | 2 |
Date | 1/4/99 |
Reported by | Internal |
Affects | System calls |
Files | crt0.s_permanent |
Problem Description
Certain input/output system calls do not include a membar #MemIssue to
ensure consistency between the unix address space and the simulated address
space. This may potentially lead to run-time errors (segmentation faults or
incorrect results).
Suggested work-around
The file crt0.s_permanent needs to be modified to include membar #MemIssue
for the read and sys_bzero system calls. The application library needs to
be remade as well.
.global sys_bzero
sys_bzero:
membar #MemIssue ! this trap actually writes into the UNIX address
space, so everything better be globally performed to prevent WAR hazard
ld [%fp],%g0
unimp 0x20
retl
nop
.global read
.global _read
.global __read
read:
_read:
__read:
membar #MemIssue ! this trap actually writes into the UNIX address
space, so everything better be globally performed to prevent WAR hazard
ld [%fp],%g0
unimp 0x67
retl
nop
.global write
.global _write
.global __write
time:
_time:
__time:
membar #MemIssue ! this trap actually writes into the UNIX address
space, so everything better be globally performed to prevent WAR hazard
ld [%fp],%g0
unimp 0x64
retl
nop
.global times
.global _times
.global __times
times:
_times:
__times:
membar #MemIssue ! this trap actually writes into the UNIX address
space, so everything better be globally performed to prevent WAR hazard
ld [%fp],%g0
unimp 0x65
retl
nop
.global sbrk
.global _sbrk
.global __sbrk