syscall_emul: fix bug in aux vector initialization
Writing 16 bytes from an 8-byte source value is a bad idea. This doesn't appear to have broken anything, but showed up as spurious differences when tracediffing runs.
This commit is contained in:
parent
f6b828d068
commit
92b750d5ef
1 changed files with 4 additions and 2 deletions
|
@ -983,8 +983,10 @@ X86LiveProcess::argsInit(int pageSize,
|
||||||
}
|
}
|
||||||
//Write out the terminating zeroed auxilliary vector
|
//Write out the terminating zeroed auxilliary vector
|
||||||
const uint64_t zero = 0;
|
const uint64_t zero = 0;
|
||||||
initVirtMem.writeBlob(auxv_array_base + 2 * intSize * auxv.size(),
|
initVirtMem.writeBlob(auxv_array_base + auxv.size() * 2 * intSize,
|
||||||
(uint8_t*)&zero, 2 * intSize);
|
(uint8_t*)&zero, intSize);
|
||||||
|
initVirtMem.writeBlob(auxv_array_base + (auxv.size() * 2 + 1) * intSize,
|
||||||
|
(uint8_t*)&zero, intSize);
|
||||||
|
|
||||||
initVirtMem.writeString(aux_data_base, platform.c_str());
|
initVirtMem.writeString(aux_data_base, platform.c_str());
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue