sim-se: Fixed initialization array size
authorTiago Muck <tiago.muck@arm.com>
Tue, 28 Aug 2018 17:44:54 +0000 (12:44 -0500)
committerGiacomo Travaglini <giacomo.travaglini@arm.com>
Fri, 22 Mar 2019 14:31:40 +0000 (14:31 +0000)
Doubled the size of the zeroed auxiliary vector since 2 * intSize on
aarch64 > sizeof(uint64).

Change-Id: I5196b000a696e9ea3f2b5daa5d5bb071794369aa
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/17088
Reviewed-by: Ciro Santilli <ciro.santilli@arm.com>
Maintainer: Brandon Potter <Brandon.Potter@amd.com>

src/arch/arm/process.cc

index bc4495941c07c88d61a3590f3aa4b7c599980c54..ba9fbfaa32cda15a3e81d619e25db340fc5bee6b 100644 (file)
@@ -442,10 +442,10 @@ ArmProcess::argsInit(int pageSize, IntRegIndex spIndex)
                               (uint8_t*)&(auxv[x].getAuxVal()),
                               intSize);
     }
-    //Write out the terminating zeroed auxilliary vector
-    const uint64_t zero = 0;
+    //Write out the terminating zeroed auxillary vector
+    const IntType zero[2] = {0, 0};
     initVirtMem.writeBlob(auxv_array_base + 2 * intSize * auxv.size(),
-            (uint8_t*)&zero, 2 * intSize);
+            (uint8_t*)zero, 2 * intSize);
 
     copyStringArray(envp, envp_array_base, env_data_base, initVirtMem);
     copyStringArray(argv, argv_array_base, arg_data_base, initVirtMem);