Jason Lowe-Power has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/18068

Change subject: sim-se: Fix invalid delete of params on clone
......................................................................

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.

In fact, it's used in
https://gem5-review.googlesource.com/c/public/gem5/+/12309 which will
cause a seg fault if a cloned process calls clone. (I think)

Change-Id: I46cc23a09e4e9b6bc2fdcd961148324c41820815
Signed-off-by: Jason Lowe-Power <[email protected]>
---
M src/sim/syscall_emul.hh
1 file changed, 0 insertions(+), 1 deletion(-)



diff --git a/src/sim/syscall_emul.hh b/src/sim/syscall_emul.hh
index 0378bd7..b1e15e2 100644
--- a/src/sim/syscall_emul.hh
+++ b/src/sim/syscall_emul.hh
@@ -1552,7 +1552,6 @@
     pp->pid = temp_pid;
     pp->ppid = (flags & OS::TGT_CLONE_THREAD) ? p->ppid() : p->pid();
     Process *cp = pp->create();
-    delete pp;

     Process *owner = ctc->getProcessPtr();
     ctc->setProcessPtr(cp);

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/18068
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-Change-Id: I46cc23a09e4e9b6bc2fdcd961148324c41820815
Gerrit-Change-Number: 18068
Gerrit-PatchSet: 1
Gerrit-Owner: Jason Lowe-Power <[email protected]>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to