apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dimitry Andric <dimi...@andric.com>
Subject Re: Possible issue in apr/file_io/unix/filestat.c with clank35+ and optimization level above -O0
Date Wed, 26 Nov 2014 23:41:07 GMT
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


Mime
View raw message