projects
/
gem5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8480615
)
mem: Fix use-after-free bug
author
Mitch Hayenga
<mitch.hayenga+gem5@gmail.com>
Tue, 8 Jan 2013 13:54:06 +0000
(08:54 -0500)
committer
Mitch Hayenga
<mitch.hayenga+gem5@gmail.com>
Tue, 8 Jan 2013 13:54:06 +0000
(08:54 -0500)
Running with valgrind I noticed a use after free originating from
simple_mem.cc. It looks like this is a known issue and this additional call
site was missed in an earlier patch.
src/mem/simple_mem.cc
patch
|
blob
|
history
diff --git
a/src/mem/simple_mem.cc
b/src/mem/simple_mem.cc
index d3a53a26f38304f8686178f65640ab6d726f8f88..7dd0fd1011d55d98863d67749534498faee18e9d 100644
(file)
--- a/
src/mem/simple_mem.cc
+++ b/
src/mem/simple_mem.cc
@@
-154,7
+154,7
@@
SimpleMemory::recvTimingReq(PacketPtr pkt)
assert(pkt->isResponse());
port.schedTimingResp(pkt, curTick() + latency);
} else {
-
delete pkt
;
+
pendingDelete.push_back(pkt)
;
}
return true;