mmgc: review/remove offsetof uses on non-POD data

NEW
Unassigned

Status

Tamarin
Garbage Collection (mmGC)
--
trivial
7 years ago
7 years ago

People

(Reporter: pnkfelix, Unassigned)

Tracking

Details

Compiling the player with xcode yields warnings like:

<avmplus>/MMgc/GC.cpp:281: warning: invalid access to non-static data member 'MMgc::GCBlockHeader::next' of NULL object

These correspond to uses of offsetof in assertions that almost certainly predate Lars's refactoring to unify GCLargeAlloc::LargeBlock and GCAlloc::GCBlock to share a common base class.  In particular, the next member of both is actually their mutual 'next' member in GCAlloc::GCBlockHeader.  (The irony here is that it is probably that same refactoring that made these structures non-POD data and thus introduced the warning in the first place.)
A more realistic reaction to this problem would be to add:

  GCC_WARN_ABOUT_INVALID_OFFSETOF_MACRO = NO

into the MMgc-Common.xcconfig file in the player project.
You need to log in before you can comment on or make changes to this bug.