Closed
Bug 483783
Opened 16 years ago
Closed 16 years ago
avmshell crash when creating large string
Categories
(Tamarin Graveyard :: Virtual Machine, defect, P2)
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: cpeyer, Assigned: treilly)
References
Details
Attachments
(4 files)
9.35 KB,
patch
|
Details | Diff | Splinter Review | |
4.39 KB,
patch
|
lhansen
:
review+
|
Details | Diff | Splinter Review |
2.95 KB,
patch
|
lhansen
:
review+
|
Details | Diff | Splinter Review |
2.01 KB,
text/plain
|
brbaker
:
review+
|
Details |
as:
var myString:String = "";
for(var j:Number = 0; j < 3000000; j++)
myString += "a";
Problem only starts when string is near 3000000 characters long. Introduced in tamarin redux changeset 1533 or 1534.
result build 1534 windows:
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
result build 1535 windows:
avmplus crash: exception 0xC0000005 occurred
Writing minidump crash log to avmplusCrash.dmp
result build 1534 mac:
Bus Error
QE Note: Need to add regression test to testsuite.
Flags: in-testsuite?
Flags: flashplayer-triage+
Flags: flashplayer-qrb?
Assignee | ||
Comment 1•16 years ago
|
||
This works for me on mac, its possible Erik fixed this when he fixed that other bug. Suggest re-test on windows.
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → WORKSFORME
Comment 2•16 years ago
|
||
Using the sample code provide in comment#0
windows 32 - crash
windows 64 - PASS
windows mobile - crash
mac 10.5 intel 32|64 - PASS
mac 10.5 PPC 32 - bus error
mac 10.5 PPC 64 - PASS
mac 10.4 intel - bus error
mac 10.4 PPC - bus error
linux 32|64 - PASS
Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---
Updated•16 years ago
|
Flags: flashplayer-qrb? → flashplayer-qrb+
Priority: -- → P2
Assignee | ||
Comment 3•16 years ago
|
||
Cool, thanks Brent, I was able to repro on Win32, working on a fix.
Assignee | ||
Comment 4•16 years ago
|
||
fixed in 1622
Status: REOPENED → RESOLVED
Closed: 16 years ago → 16 years ago
Resolution: --- → FIXED
Updated•16 years ago
|
Attachment #367765 -
Attachment is patch: true
Attachment #367765 -
Attachment mime type: application/octet-stream → text/plain
Comment 5•16 years ago
|
||
- please set the patch flag on patches to make diff readable in bugzilla
- review? this doesn't look trivial.
- add bug # and reviewer to checkin comment (bug=xxx, r=woever+)
for trivial fixes, sometimes "r=me" is okay, but say so, and this doesn't look trivial.
Assignee | ||
Comment 6•16 years ago
|
||
changeset: 1622:fef62d74de1a
tag: tip
user: Tommy Reilly <treilly@adobe.com>
date: Tue Mar 24 12:32:15 2009 -0400
summary: Fix RemoveBlock, two bugs a) not setting blocksLen correctly and b) need_sentinel check was wrong
Attachment #369090 -
Flags: review?(lhansen)
Assignee | ||
Comment 7•16 years ago
|
||
sorry Ed, Erik's not here and its fixing some bugs in some bug fixing he did. I asked Lars to review and posted the after the fact diff. The actual fixes are just two lines, the diff is mostly new asserts/sanity checking code.
Comment 8•16 years ago
|
||
Comment on attachment 369090 [details] [diff] [review]
patch
You should add an assertion to the validation function:
(block->baseAddr != 0) == (block->size != 0)
This is assumed and in fact checked (in the last case) but not on the path where the fact is used (namely, where next is used to update block). It would be useful to make it clearer and check it sooner.
Attachment #369090 -
Flags: review?(lhansen) → review+
Assignee | ||
Comment 9•16 years ago
|
||
Attachment #369421 -
Flags: review?(lhansen)
Assignee | ||
Updated•16 years ago
|
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Assignee | ||
Comment 10•16 years ago
|
||
sandbox build results look almost good, one windows interp crash I need to investigate.
Comment 11•16 years ago
|
||
Comment on attachment 369421 [details] [diff] [review]
fix remove block issues
I'm sure I don't understand why there has to be one big array covering all the regions, necessitating this shuffling, but we'll cross that bridge later.
In code close to this you need to ensure that 'committed' and 'dirty' are initialized when you create a new sentinel block. A constructor on HeapBlock might be in order so that these bugs are harder to introduce.
Attachment #369421 -
Flags: review?(lhansen) → review+
Assignee | ||
Comment 12•16 years ago
|
||
fixed in 1630
Status: REOPENED → RESOLVED
Closed: 16 years ago → 16 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 13•16 years ago
|
||
Well you need some way to track what pages are in use/committed/freed that may span regions. A bitmap for each continguous set of regions would suffice with two bits per (one to know if its in use and one to know if its committed).
Then you need a simple way to lookup free blocks. A segregated power of two freelist would work nicely (each freelist entry would be a index into the bitmap and a region base addr maybe). Since pages can be decommitted you can't store the freelist pointer there. You could have a separate data structure to track uncommitted regions, might make sense given that in the !useVirtualMemory case there are no uncommitted regions.
HeapBlock does all this with one data structure which is nice but RemoveBlock is a bit of a sore spot.
Comment 14•16 years ago
|
||
The reason I'm complaining is that the single, large array structure is not going to benefit non-VM systems (no region spanning) one hoot, it only induces fragmentation in the underlying memory allocator. Hanging an array of HeapBlocks off each region data structure would work better in this case.
I don't want to turn this bug into a discussion of whether the interface from GCHeap to the underlying memory is appropriately abstract or not (I don't think it is), but I will start that discussion elsewhere.
Assignee | ||
Comment 15•16 years ago
|
||
Blocks span regions on non-VM systems too, anything contiguous is treated as such.
Comment 16•16 years ago
|
||
(In reply to comment #15)
> Blocks span regions on non-VM systems too, anything contiguous is treated as
> such.
All right. (A recent change no doubt; until very recently blocksSpanRegions, now gone, was a VM-only setting. Also until very recently, allocations in a non-VM system were always non-contiguous because blocks were allocated 4095 bytes too large so that we could be assured of alignment, so the point would be moot - it would never happen.)
Assignee | ||
Comment 17•16 years ago
|
||
blocksSpanRegions was an recent addition that turned out to not have any effect so I removed it. And your right but using valloc allocations can now be contiguous but we don't check it and set the contiguous flag so you're still right that blocks don't span regions on !vm but there's no reason they shouldn't that I can think of.
Reporter | ||
Comment 18•15 years ago
|
||
Attachment #406090 -
Flags: review?(brbaker)
Reporter | ||
Updated•15 years ago
|
Status: RESOLVED → VERIFIED
Updated•15 years ago
|
Attachment #406090 -
Flags: review?(brbaker) → review+
Reporter | ||
Comment 19•15 years ago
|
||
Testcase pushed r2809: http://hg.mozilla.org/tamarin-redux/rev/3b68a4c6a462
Flags: in-testsuite? → in-testsuite+
You need to log in
before you can comment on or make changes to this bug.
Description
•