Closed
Bug 507395
Opened 16 years ago
Closed 16 years ago
Incorrect check for atoms in Sampler::presweep
Categories
(Tamarin Graveyard :: Tools, defect)
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: rhudea, Unassigned)
Details
Attachments
(1 file, 1 obsolete file)
|
946 bytes,
patch
|
treilly
:
review+
stejohns
:
superreview+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/532.0 (KHTML, like Gecko) Chrome/3.0.195.3 Safari/532.0
Build Identifier:
In Sampler::presweep, there is the following check needed to keep the object's type alive:
if (s.typeOrVTable > 7 && !GC::GetMark((void*)s.typeOrVTable))
{
GCWorkItem item((void*)s.typeOrVTable, (uint32)GC::Size((void*)s.typeOrVTable), true);
core->gc->PushWorkItem(item);
}
But "s.typeOrVTable > 7" is not enough to differentiate between basic types and atoms, because in recordAllocationInfo there is this code:
if(typeOrVTable < 7 && core->codeContext() && core->codeContext()->domainEnv()) {
typeOrVTable |= (uintptr)core->codeContext()->domainEnv()->toplevel();
}
Example:
For an allocated String object, typeOrVTable = 2 (kStringType), but after executing the code above, typeOrVTable becomes greater than
7.
When Sampler::presweep is executed and the String object is found, GCWorkItem will assert because typeOrVTable is not 8-byte aligned.
Reproducible: Always
| Reporter | ||
Comment 1•16 years ago
|
||
Use atomPtr for typeOrVTable. Suggestion from treilly.
Attachment #391619 -
Flags: superreview?(stejohns)
Attachment #391619 -
Flags: review?(treilly)
Comment 2•16 years ago
|
||
Comment on attachment 391619 [details] [diff] [review]
Use atomPtr on typeOrVTable
naming nit, ptr would be a better name, since after the call to atomPtr its no longer an atom.
Shouldn't the first test be atom != NULL instead of !atom?
Attachment #391619 -
Flags: review?(treilly) → review-
| Reporter | ||
Comment 3•16 years ago
|
||
Attachment #391619 -
Attachment is obsolete: true
Attachment #391627 -
Flags: superreview?(stejohns)
Attachment #391627 -
Flags: review?(treilly)
Attachment #391619 -
Flags: superreview?(stejohns)
Updated•16 years ago
|
Attachment #391627 -
Flags: superreview?(stejohns) → superreview+
Updated•16 years ago
|
Attachment #391627 -
Flags: review?(treilly) → review+
Comment 4•16 years ago
|
||
changeset: 2289:361724188074
Status: UNCONFIRMED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Updated•16 years ago
|
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•