diff options
author | Jason Lowe-Power <jason@lowepower.com> | 2019-04-15 14:00:21 -0700 |
---|---|---|
committer | Brandon Potter <Brandon.Potter@amd.com> | 2019-10-03 13:52:03 +0000 |
commit | aa3b372a9598192a02e084b7ddf1cfa6426019fb (patch) | |
tree | 5aac8292b11f1387919eb1bf886952a45fc21ff7 /src | |
parent | d9fee95b715e54eafbd2c5c2a618ef92af32e3a5 (diff) | |
download | gem5-aa3b372a9598192a02e084b7ddf1cfa6426019fb.tar.xz |
sim-se: Fix invalid delete of params on clone
The params pointer is kept by the SimObject and should not be deleted
until gem5 exits. Added a to do to remember this object is leaked.
Change-Id: I46cc23a09e4e9b6bc2fdcd961148324c41820815
Signed-off-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/18068
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Brandon Potter <Brandon.Potter@amd.com>
Reviewed-by: Brandon Potter <Brandon.Potter@amd.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/sim/syscall_emul.hh | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/sim/syscall_emul.hh b/src/sim/syscall_emul.hh index 130791d20..fb6e9a168 100644 --- a/src/sim/syscall_emul.hh +++ b/src/sim/syscall_emul.hh @@ -1562,7 +1562,9 @@ cloneFunc(SyscallDesc *desc, int callnum, ThreadContext *tc) pp->useArchPT = p->useArchPT; pp->kvmInSE = p->kvmInSE; Process *cp = pp->create(); - delete pp; + // TODO: there is no way to know when the Process SimObject is done with + // the params pointer. Both the params pointer (pp) and the process + // pointer (cp) are normally managed in python and are never cleaned up. Process *owner = ctc->getProcessPtr(); ctc->setProcessPtr(cp); |