[llvm] r241674 - [yaml2obj] Align section content using AddressAlign field's value
Kuba Brecka
jbrecka at apple.com
Thu Jul 9 08:35:01 PDT 2015
Nope, doesn’t fix that, these two tests still fail the assert.
Kuba
> On 09 Jul 2015, at 17:20, Simon Atanasyan <simon at atanasyan.com> wrote:
>
> Hi,
>
> I think the problem is in the missed section alignment in the tests.
> Default value for the AddressAlign filed is 0. But MIPS .rela.text
> sections uses 8-byte alignment and X86-64 .text section uses 4-byte
> alignment.
>
> Could you try the attached patch? Does it fix the problem?
>
> Simon
>
> On Thu, Jul 9, 2015 at 6:05 PM, Kuba Brecka <jbrecka at apple.com> wrote:
>> After this commit, one of our internal bots fails these two tests:
>>
>> Failing Tests (2):
>> LLVM :: Object/Mips/elf-mips64-rel.yaml
>> LLVM :: Object/yaml2obj-elf-symbol-basic.yaml
>>
>>
>> It looks like this is due to some wrongly assumed alignment, and some
>> optimization is turning this into a crash only on this machine, while other
>> buildbots seem to run fine. I was able to reproduce the issue on my machine
>> by adding the following assert (that explicitly checks the assumed
>> alignment) into Support/Endian.h:
>>
>> inline value_type read(const void *memory) {
>> assert(((long)memory & ((detail::PickAlignment<value_type,
>> alignment>::value)-1)) == 0);
>> value_type ret;
>>
>> memcpy(&ret,
>> LLVM_ASSUME_ALIGNED(memory,
>> (detail::PickAlignment<value_type, alignment>::value)),
>> sizeof(value_type));
>> return byte_swap<value_type, endian>(ret);
>> }
>>
>> Do you think you could take a look into that?
>>
>> Thanks,
>> Kuba
>>
>> On 08 Jul 2015, at 12:12, Simon Atanasyan <simon at atanasyan.com> wrote:
>>
>> Author: atanasyan
>> Date: Wed Jul 8 05:12:40 2015
>> New Revision: 241674
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=241674&view=rev
>> Log:
>> [yaml2obj] Align section content using AddressAlign field's value
>>
>> Use AddressAlign field's value to properly align sections content in the
>> yaml2obj tool. Before this change the yaml2obj ignored AddressAlign and
>> always aligned section on 16 bytes boundary.
> <alignment.patch>
More information about the llvm-commits
mailing list