[erlang-bugs] file:pread broken with GCC 4.8

Lukas Larsson lukas@REDACTED
Fri Aug 16 11:13:45 CEST 2013


Hello Manish,

Thanks for reporting this again and digging into it a little deeper. 
I've created a fix which solves the problem as seen by Tomas and will 
include it in the R16B02 release. I'll be testing the fix over the 
weekend and hopefully it will be visible in maint on github by early 
next week.

Lukas

On 15/08/13 20:43, Manish Singh wrote:
> I've also run into this problem:
>
> http://erlang.org/pipermail/erlang-bugs/2013-July/003674.html
>
> At first I thought it was a gcc bug, but 
> http://gcc.gnu.org/bugs/#report says "if compiling with 
> -fno-strict-aliasing -fwrapv -fno-aggressive-loop-optimizations makes 
> a difference, your code probably is not correct." Compiling 
> efile_drv.c with -fno-aggressive-loop-optimizations makes the problem 
> go away.
>
> With -Wextra, there are warnings about signed/unsigned comparisons, 
> which might be causing this:
>
> drivers/common/efile_drv.c:3749:14: note: in expansion of macro 
> 'EV_GET_UINT64'
>       if (   !EV_GET_UINT64(ev, &d->c.preadv.offsets[i-1], &p, &q)
>               ^
> drivers/common/efile_drv.c:590:30: warning: comparison between signed 
> and unsigned integer expressions [-Wsign-compare]
>          *(pp) = (    *(pp)+8 < (ev)->iov[*(qp)].iov_len   \
>                               ^
> drivers/common/efile_drv.c:3749:14: note: in expansion of macro 
> 'EV_GET_UINT64'
>       if (   !EV_GET_UINT64(ev, &d->c.preadv.offsets[i-1], &p, &q)
>               ^
> drivers/common/efile_drv.c:564:14: warning: comparison between signed 
> and unsigned integer expressions [-Wsign-compare]
>      (*(pp)+4 <= (ev)->iov[*(qp)].iov_len                  \
>               ^
> drivers/common/efile_drv.c:3750:7: note: in expansion of macro 
> 'EV_GET_UINT32'
>    || !EV_GET_UINT32(ev, &sizeH, &p, &q)
>        ^
> drivers/common/efile_drv.c:569:30: warning: comparison between signed 
> and unsigned integer expressions [-Wsign-compare]
>          *(pp) = (    *(pp)+4 < (ev)->iov[*(qp)].iov_len   \
>                               ^
> drivers/common/efile_drv.c:3750:7: note: in expansion of macro 
> 'EV_GET_UINT32'
>    || !EV_GET_UINT32(ev, &sizeH, &p, &q)
>        ^
> drivers/common/efile_drv.c:564:14: warning: comparison between signed 
> and unsigned integer expressions [-Wsign-compare]
>      (*(pp)+4 <= (ev)->iov[*(qp)].iov_len                  \
>               ^
> drivers/common/efile_drv.c:3751:7: note: in expansion of macro 
> 'EV_GET_UINT32'
>    || !EV_GET_UINT32(ev, &sizeL, &p, &q)) {
>        ^
> drivers/common/efile_drv.c:569:30: warning: comparison between signed 
> and unsigned integer expressions [-Wsign-compare]
>          *(pp) = (    *(pp)+4 < (ev)->iov[*(qp)].iov_len   \
>                               ^
> drivers/common/efile_drv.c:3751:7: note: in expansion of macro 
> 'EV_GET_UINT32'
>    || !EV_GET_UINT32(ev, &sizeL, &p, &q)) {
>        ^
> drivers/common/efile_drv.c:581:14: warning: comparison between signed 
> and unsigned integer expressions [-Wsign-compare]
>      (*(pp)+8 <= (ev)->iov[*(qp)].iov_len                  \
>
> -Manish
>
>
> _______________________________________________
> erlang-bugs mailing list
> erlang-bugs@REDACTED
> http://erlang.org/mailman/listinfo/erlang-bugs

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-bugs/attachments/20130816/bfa661ea/attachment.htm>


More information about the erlang-bugs mailing list