|Title||MPS unaligned references are not detected by AMC pools|
|Assigned user||Gareth Rees|
|Description||MPS unaligned references are not detected by AMC pools|
This may reduce efficiency, and weaken error detection and reporting:
Unaligned 'references' are obviously invalid. If ambiguous, they should be ignored. [Not necessarily right; see below.] If exact, this is a fault and should be detected and reported immediately.
AMC pools do not detect unaligned references. If ambiguous, AMC accepts it as equivalent to the next lower aligned reference, and may erroneously preserve a dead object: this could unnecessarily increase ambiguous retention. If exact, AMC accepts it and passes it to the client's format code: this acceptence and continued processing of invalid data could cause client format code, or MPS code, to fail later, in unclear ways.
|Analysis||RHSK 2009-10-15: Suspected and somewhat confirmed, but not yet thoroughly confirmed .|
GDR 2012-10-17: see also job003317.
GDR 2012-11-06: it's possible that genuine unaligned references could appear in registers: see job003359 for a case where Clang stored a pointer to an interior field of an object in a register; if the field has been unaligned (e.g. a byte field) then the reference would have been unaligned too. So ambiguous unaligned references should not be ignored: they might be the only reference keeping an object alive. (Unaligned exact references are of course errors.)
|Evidence|| Inspection of poolamc.c revision 23 |
|Created by||Richard Kistruck|
|Created on||2009-10-15 16:09:19|
|Last modified by||Gareth Rees|
|Last modified on||2014-10-19 08:58:14|
|History||2009-10-15 RHSK Created.|
2013-03-19 GDR Assigned to RB.
|187162||closed||2014-10-08 21:13:34||Gareth Rees||AMC now asserts that references (unless ambiguous) are aligned to the pool alignment.|