[prev in list] [next in list] [prev in thread] [next in thread] 

List:       apr-dev
Subject:    Re: Possible issue in apr/file_io/unix/filestat.c with clank35+ and optimization level above -O0
From:       Dimitry Andric <dimitry () andric ! com>
Date:       2014-11-26 23:41:07
Message-ID: A2101054-A600-4EF6-99C4-1CCB05AA0068 () andric ! com
[Download RAW message or body]

On 18 Nov 2014, at 17:39, Jeff Trawick <trawick@gmail.com> wrote:
> On Tue, Nov 18, 2014 at 4:06 PM, olli hauer <ohauer@gmx.de> wrote:
>> A user found a possible issue in apr-1.5.1/file_io/unix/filestat.c. [1]
>>
>> It seems the following code snippet will could be an potential issue in
>> case apr is build with clang35 and optimization level is above -O0
>>
>>
>> --- apr-1.5.1/file_io/unix/filestat.c
>> +++ apr-1.5.1/file_io/unix/filestat.c
>> @@ -297,7 +297,6 @@ APR_DECLARE(apr_status_t) apr_stat(apr_f
>>          finfo->pool = pool;
>>          finfo->fname = fname;
>>          fill_out_finfo(finfo, &info, wanted);
>> -        if (wanted & APR_FINFO_LINK)
>>              wanted &= ~APR_FINFO_LINK;
>>          return (wanted & ~finfo->valid) ? APR_INCOMPLETE : APR_SUCCESS;
>>      }
>>
>> Can someone from the APR team verify the findings ?
>>
>>
>> [1] https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=193905
>>
>>
>> --
>> Regards,
>> olli
>>
>
> is there an easy way to install and use clang 3.5 on FreeBSD 10.1 without
> touching the system compiler (clang 3.4.1)?

Hi,

You could do that by installing the port, but you don't have to bother.
It is a bug in one of the llvm optimization passes, introduced before
3.5.0 was released, unfortunately.

The bad commit has been reverted here:

http://llvm.org/viewvc/llvm-project?view=revision&revision=222856

I will pull this fix into FreeBSD's copy of clang when I import 3.5.0
into the base system.  The clang 3.5.0 port will have to be fixed by its
maintainer.

LLVM upstream will probably also include this fix in 3.5.1.  At least,
I sincerely hope they do. :)

-Dimitry


["signature.asc" (signature.asc)]

-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.26

iEYEARECAAYFAlR2ZRoACgkQsF6jCi4glqOqOACfX/hsk2QXp45Ms/kdLy3G6FKT
+kwAoMUk8PH9C444huN92vs7D6SIMIui
=lSv/
-----END PGP SIGNATURE-----


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic