Missing alignment in SFrame spec
Indu Bhagat
indu.bhagat@oracle.com
Wed May 3 17:37:50 GMT 2023
On 5/1/23 11:03 PM, Florian Weimer via Binutils wrote:
> * Indu Bhagat:
>
>> On 4/28/23 01:08, Florian Weimer wrote:
>>> The SFrame specification does not say anything explict about alignment.
>>> It uses ATTRIBUTE_PACKED, which strongly suggests alignment 1, but
>>> looking at the structures themselves, I think what you actually want is
>>> 4-byte alignment.
>>> Thanks,
>>> Florian
>>>
>>
>> Hi Florian,
>>
>> SFrame stack trace format is an unaligned on-disk format. IIUC, you
>> suggest 4 byte alignment for all structs in SFrame format?
>>
>> Yes, current SFrame FDE and SFrame FRE are 1-byte aligned.
>>
>> I had reasoned about unaligned accesses previously when a bug showed up.
>
> Well, GAS seems to generate 8-byte-aligned .sframe sections (at least in
> the 2.40-7.fc39 Fedora package). So all this is a bit inconsistent.
>
I will work on making the spec clear about alignment expectations for
the .sframe section and the various definitions in the format.
> Thanks,
> Florian
>
More information about the Binutils
mailing list