From: Tiago Muck Date: Tue, 28 Aug 2018 17:44:54 +0000 (-0500) Subject: sim-se: Fixed initialization array size X-Git-Tag: v19.0.0.0~1021 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=759795a6b9e6e75c1e671457ef91b6329a692b18;p=gem5.git sim-se: Fixed initialization array size 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 Maintainer: Brandon Potter --- diff --git a/src/arch/arm/process.cc b/src/arch/arm/process.cc index bc4495941..ba9fbfaa3 100644 --- a/src/arch/arm/process.cc +++ b/src/arch/arm/process.cc @@ -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);