Crash subdoarg/quickrepeat on corrupted script data #717
Comments
|
Comment author: @bob-the-hamster Created attachment 154
|
|
Comment author: @bob-the-hamster Okay, so although this crash is random, it always happens in the same place quickrepeat: SELECT CASE cmdptr->kind corrupted data at dataptr + curcmd->args(si.curargn) gets cast into a ScriptCommand ptr and assigned to cmdptr. Then when we try to dereference this bogus data to get the ->kind member in the SELECT, crashes happen. I am having a rough time of reproducing this one. I can only make it happen less than 10% of the time, but it does seem to happen most often when a long and complex recursive script that includes "wait" commands finishes. Other scripts run on top of it, such as on-keypress, each-step and several timers, but I can't tell if any of them make a difference. |
|
Comment author: @bob-the-hamster Possible re-incarnation of bug bz#653? |
|
Comment author: @bob-the-hamster http://hamsterrepublic.com/tmp/baconcrash.zip This is my (unfortunately not-at-all-simplified) test case for reproducing this bug. This is an early development version of Bob the Hamster in the Crypt of Baconthulhu (which I did not post here sooner to avoid penalty points in the Terrible Games Contest) Here is how to do it.
The crash will occur when the dungeon matures (that is when the deeply recursive generate map script completes). * The crash NEVER happens if you don't fight a monster |
|
Comment author: @bob-the-hamster Yay! TeeEmCee, your fixes in svn revision 2708 (1dcca6c) fixed this bug. I am overjoyed! |
|
Comment author: @rversteegen Actually, I'm disappointed. I was SO sure that my crash and possibly yours was due to bug bz#270, because I did some really weird stuff with break: script, text, t, begin script, text sub, t, begin Guess bug bz#270 will go unsolved forever (until the interpreter is replaced) |
[bz#717]
I have a game that is crashing randomly with segmentation faults on "SELECT CASE cmdptr->kind" right after the quickrepeat label in subdoarg()
I have no idea yet where the corruption could be happening, this is just where it causes the crash.
From: @bob-the-hamster
Reported version: 20110506 Zenzizenzic
Severity: major
Blocker for: bz#683
The text was updated successfully, but these errors were encountered: