From: Vince Weaver Date: Mon, 9 Nov 2009 15:02:55 +0000 (-0500) Subject: syscall: missing initializer in getcwd call X-Git-Tag: stable_2012_02_02~1575^2~79^2~4 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7da221ca82e5e64b98d9e86421fa653e2ad3e540;p=gem5.git 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. --- 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);