diff options
author | Vince Weaver <vince@csl.cornell.edu> | 2009-11-09 10:02:55 -0500 |
---|---|---|
committer | Vince Weaver <vince@csl.cornell.edu> | 2009-11-09 10:02:55 -0500 |
commit | 7da221ca82e5e64b98d9e86421fa653e2ad3e540 (patch) | |
tree | 9b7916423f767848c3f29fce335d5b8f95c4a56c | |
parent | b1a1f9aec8a2dcd5fbaa556c96d5cb1eeac4bd38 (diff) | |
download | gem5-7da221ca82e5e64b98d9e86421fa653e2ad3e540.tar.xz |
syscall: missing initializer in getcwd call
This one case was missed during the update to stack-based arguments.
Without this fix, m5 will crash during a gwtcwd call, at least
with X86.
-rw-r--r-- | src/sim/syscall_emul.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sim/syscall_emul.cc b/src/sim/syscall_emul.cc index 7cffffcf1..4461e8b52 100644 --- a/src/sim/syscall_emul.cc +++ b/src/sim/syscall_emul.cc @@ -306,7 +306,7 @@ SyscallReturn getcwdFunc(SyscallDesc *desc, int num, LiveProcess *p, ThreadContext *tc) { int result = 0; - int index; + int index = 0; Addr bufPtr = p->getSyscallArg(tc, index); unsigned long size = p->getSyscallArg(tc, index); BufferArg buf(bufPtr, size); |