Re: [PATCH bpf-next v9 0/9] bpf: getsockopt and setsockopt hooks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jun 27, 2019 at 3:43 PM Stanislav Fomichev <sdf@xxxxxxxxxxx> wrote:
>
> > There is a build warning though:
> > test_sockopt_sk.c: In function ‘getsetsockopt’:
> > test_sockopt_sk.c:115:2: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
> >   if (*(__u32 *)buf != 0x55AA*2) {
> >   ^~
> > test_sockopt_sk.c:116:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
> >    log_err("Unexpected getsockopt(SO_SNDBUF) 0x%x != 0x55AA*2",
> >    ^~~~~~~
> >
> > Pls fix it in the follow up.
> Sure, but I can't reproduce it with gcc7 nor with clang9 :-/

I see it with gcc 6.3




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux