'Assumes offset starts from a properly aligned location'

def sentry_record_alignment(self, rectyp, attr):

    if self.strict_alignment:
        offset = rectyp.offset(attr)
        elemty = rectyp.typeof(attr)
        align = self.get_abi_alignment(self.get_data_type(elemty))
        if (offset % align):
            msg = '{rec}.{attr}    of    type    {type}    is    not    aligned'.format(rec=rectyp, attr=attr, type=elemty)
            raise TypeError(msg)
