gnash-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnash-dev] Segmentation fault caused by bug in SafeStack?


From: Tom Stellard
Subject: Re: [Gnash-dev] Segmentation fault caused by bug in SafeStack?
Date: Tue, 8 Jul 2008 11:16:31 +0800

I have fixed the bug that was causing my segmentation fault.  It looks like the SafeStack is a stack of arrays.  Each array contains 1<<mChunckShift items.  When an array becomes full, a new array is pushed on to the back of the stack.  The bug was in the SafeStack::top(unsigned int i) function.  It was calculating the array index of the top item as mEnd - 0.  mEnd is always the number of items in the array plus 1.  This means the array index of the top item was always calculated as number of items + 1, but since this is a 0 based array, the index of the top item should be number of items  - 1.  I have attached a patch to fix this bug, but now I am getting a segmentation fault in the abc_block::read_instances() function, which might be a different bug in SafeStack, but I haven't investigated it yet.

How do you produce the test cases ? Can we work on setting up an AVM2 specific
testing framework to ensure every reached milestone is not broken later ?

Right now I am using mlb.com's gameday to test the AVM2 code: http://mlb.mlb.com/flash/gameday/v4/gameday_full_loader.swf?v=5

I have been using gameday for a few years, and it seems like a good real world test case, because they always start to take advantage of new features in the flash player as soon as possible.  As far a testing framework, I would be able to work on setting something up for AVM2.  Although, I might need some help getting started.

-Tom

Attachment: SafeStack.diff
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]