Linux/ARM: Bus error with -O3 flag of clang/llvm-3.6 while running unit-test of .NET Core

Tim Northover via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 14 20:00:45 PDT 2016


On 14 July 2016 at 19:47, Geunsik Lim <leemgs at gmail.com> wrote:
>> It won't give you an error (just a warning), but no-one I know thinks
>>  doing anything special with it is a good idea. It's accepted purely
>> for compatibility I think.
>
> When I used -O3, I have got the below messages while building CoreCLR.

Presumably CoreCLR builds with -Werror, which turns any warning into
an error. But there's really no reason to use -O4 in the first place
since it's identical to -O3.

> I am not sure which solution is better between the below two patches.
> Could you tell me comment to get the best way?

A lot of it comes down to personal preference. Both approaches are
functional but you'd have to ask the CoreCLR developers which they
prefer.

One thing to be wary of is that those patches look like very partial
fixes. They may get rid of the current segfault, but leave the
underlying problem open in other places (just waiting for some minor
change in Clang to trigger it). When I grepped CoreCLR I saw rather
more uses of UNALIGNED than the two functions you've patched.

> Do I have to compare the generated instructions to find appropriate patch?

I'd expect them to be equivalent after optimization.

Tim.


More information about the llvm-commits mailing list