Closed
Bug 424420
Opened 17 years ago
Closed 6 years ago
analysis wanted: XPCOMGC pointer classes
Categories
(Developer Infrastructure :: Source Code Analysis, defect)
Developer Infrastructure
Source Code Analysis
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: benjamin, Unassigned)
References
Details
For XPCOMGC I logically have different flavors of "void*":
* void* pointing to non-GC memory
* void* pointing to somewhere in the middle of GC memory (an inner pointer)
* void* pointing to the beginning of a GCed memory block (an outer pointer)
For certain functions such as void MMgc::writeBarrier(const void *container, const void *address, const void *value), the "container" must be an inner pointer, the "address" is an inner pointer, and the value is an inner pointer.
I would like to enforce those restrictions, somehow. There are a set of rules that I haven't perfected yet for going from an inner GC pointer to an outer pointer, and we might want to invent a new cast operator too.
I'm thinking about something like `typedef void InnerGC __attribute__((user("NS_InnerGC")));` except I can't seem to get any attribute data in dehydra, which might be a bug... I'll file that separately.
Comment 1•17 years ago
|
||
Is there a reason why you want to check attributes instead of typedef names?
Reporter | ||
Comment 2•17 years ago
|
||
Well... I already have user attributes for GC types, so extending those to a typedef of void reduces the amount of special-case logic I'll need... but hardcoded special names would work too.
The question of pointer classes is also related to similar analyses I want to do, such as "non-GC objects containing pointers to GC objects".
Updated•17 years ago
|
Blocks: static_analyses
Updated•16 years ago
|
OS: Linux → All
Hardware: PC → All
Updated•7 years ago
|
Product: Core → Firefox Build System
Comment 3•6 years ago
|
||
XPCOMGC is not a thing.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
Updated•2 years ago
|
Product: Firefox Build System → Developer Infrastructure
You need to log in
before you can comment on or make changes to this bug.
Description
•