This repository was archived by the owner on Apr 17, 2022. It is now read-only.
This repository was archived by the owner on Apr 17, 2022. It is now read-only.
Memory clobbering (dereferenced pointers) in event.c #2300
Closed
Metadata
Metadata
Assignees
Type
Projects
Relationships
Development
No branches or pull requests
Activity
wzdev-ci commentedon Nov 8, 2010
buginator <buginator@...> commented
(In Warzone2100/warzone2100@1a6fb8a) Fix another memory clobbering issue. (dereferenced pointer)
Patch Author: Safety0ff
fixes #2300
Original detective work done by Ai_Tak (#1656)
Signed-off-by: buginator <buginator@>
wzdev-ci commentedon Nov 8, 2010
Buginator changed _comment0 which not transferred by tractive
wzdev-ci commentedon Nov 8, 2010
buginator <buginator@...> changed status from
new
toclosed
wzdev-ci commentedon Nov 8, 2010
buginator <buginator@...> changed resolution from `` to
fixed
wzdev-ci commentedon Nov 8, 2010
Buginator uploaded file
val_no_fe.txt
(1.4 KiB)wzdev-ci commentedon Nov 8, 2010
Buginator uploaded file
val_with_fe.txt
(2.0 KiB)wzdev-ci commentedon Nov 8, 2010
Buginator uploaded file
val_wPatch_fe.txt
(1.2 KiB)wzdev-ci commentedon Nov 8, 2010
Buginator uploaded file
val_wPatch_sa_fe.txt
(1.2 KiB)wzdev-ci commentedon Nov 8, 2010
Buginator uploaded file
warzone2100.gdmp-DXGWAl.txt
(9.9 KiB)wzdev-ci commentedon Nov 8, 2010
Buginator changed _comment0 which not transferred by tractive
wzdev-ci commentedon Nov 8, 2010
buginator <buginator@...> commented
In Warzone2100/warzone2100@1a6fb8a:
wzdev-ci commentedon Nov 8, 2010
Buginator commented
The deal is, when you run normal valgrind, then you get val_no_fe.txt.
Notice the invalid reads.
When you set valgrind to fill the free()ed memory with 0xfe, (--fill-free=0xfe then you get val_with_fe.txt, and also the crash dump.
The final results are in val_wPatch_sa_fe.txt, and we don't have invalid reads anymore.
wzdev-ci commentedon Nov 9, 2010
cybersphinx <chr.ohm@...> commented
(In Warzone2100/warzone2100@34112c9) Fix another memory clobbering issue. (dereferenced pointer)
Patch Author: Safety0ff
fixes #2300
Original detective work done by Ai_Tak (#1656)
Signed-off-by: buginator buginator@gna.org
(cherry picked from commit 1a6fb8a7547f23ce2bd7af153ac839cba999e2b0)
wzdev-ci commentedon Nov 9, 2010
cybersphinx <chr.ohm@...> commented
In Warzone2100/warzone2100@34112c9:
wzdev-ci commentedon Nov 9, 2010
Safety0ff commented
I don't really consider this "fixed", I've been looking at that part of the code lately and understanding it more and more.
This type of error likely only occurs when a Callback event uses the setTrigger function, but there could potentialy be other ways for setTrigger calls to mess things up.
Anyways, I'm sure that deferred deletion would solve this and it will also handle the case where multiple events are triggered and one calls setTrigger for one of those other events.
I'd rather this not be "swept under the rug".
23 remaining items