All of lore.kernel.org
 help / color / mirror / Atom feed
* Compile time assertion failure
@ 2017-08-02 12:19 Bruno Wolff III
  2017-08-02 12:24 ` Bruno Wolff III
  0 siblings, 1 reply; 5+ messages in thread
From: Bruno Wolff III @ 2017-08-02 12:19 UTC (permalink / raw)
  To: wireguard

I'm seeing the following:

[bruno@wolff src]$ make clean all
make -C /lib/modules/4.13.0-0.rc3.git0.1.fc27.i686+PAE/build M=/home/bruno/WireGuard/src clean
make[1]: Entering directory '/usr/src/kernels/4.13.0-0.rc3.git0.1.fc27.i686+PAE'
  CLEAN   /home/bruno/WireGuard/src/.tmp_versions
  CLEAN   /home/bruno/WireGuard/src/Module.symvers
make[1]: Leaving directory '/usr/src/kernels/4.13.0-0.rc3.git0.1.fc27.i686+PAE'
make -C tools clean
make[1]: Entering directory '/home/bruno/WireGuard/src/tools'
rm -f wg *.o *.d
make[1]: Leaving directory '/home/bruno/WireGuard/src/tools'
make -C /lib/modules/4.13.0-0.rc3.git0.1.fc27.i686+PAE/build M=/home/bruno/WireGuard/src modules
make[1]: Entering directory '/usr/src/kernels/4.13.0-0.rc3.git0.1.fc27.i686+PAE'
  CC [M]  /home/bruno/WireGuard/src/main.o
  CC [M]  /home/bruno/WireGuard/src/noise.o
  CC [M]  /home/bruno/WireGuard/src/device.o
  CC [M]  /home/bruno/WireGuard/src/peer.o
  CC [M]  /home/bruno/WireGuard/src/timers.o
  CC [M]  /home/bruno/WireGuard/src/data.o
  CC [M]  /home/bruno/WireGuard/src/send.o
  CC [M]  /home/bruno/WireGuard/src/receive.o
  CC [M]  /home/bruno/WireGuard/src/socket.o
  CC [M]  /home/bruno/WireGuard/src/config.o
  CC [M]  /home/bruno/WireGuard/src/hashtables.o
  CC [M]  /home/bruno/WireGuard/src/routingtable.o
In file included from ./include/uapi/linux/stddef.h:1:0,
                 from ./include/linux/stddef.h:4,
                 from ./include/uapi/linux/posix_types.h:4,
                 from ./include/uapi/linux/types.h:13,
                 from ./include/linux/types.h:5,
                 from /home/bruno/WireGuard/src/compat/compat.h:8,
                 from <command-line>:0:
In function ‘common_bits’,
    inlined from ‘node_placement.constprop’ at /home/bruno/WireGuard/src/routingtable.c:170:39,
    inlined from ‘add.part.1’ at /home/bruno/WireGuard/src/routingtable.c:195:6:
./include/linux/compiler.h:542:38: error: call to ‘__compiletime_assert_129’ declared with attribute error: BUILD_BUG_ON failed: !__builtin_constant_p(bits) || (bits != 32 && bits != 128)
  _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
                                      ^
./include/linux/compiler.h:525:4: note: in definition of macro ‘__compiletime_assert’
    prefix ## suffix();    \
    ^~~~~~
./include/linux/compiler.h:542:2: note: in expansion of macro ‘_compiletime_assert’
  _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
  ^~~~~~~~~~~~~~~~~~~
./include/linux/build_bug.h:46:37: note: in expansion of macro ‘compiletime_assert’
 #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
                                     ^~~~~~~~~~~~~~~~~~
./include/linux/build_bug.h:70:2: note: in expansion of macro ‘BUILD_BUG_ON_MSG’
  BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
  ^~~~~~~~~~~~~~~~
/home/bruno/WireGuard/src/routingtable.c:129:2: note: in expansion of macro ‘BUILD_BUG_ON’
  BUILD_BUG_ON(!__builtin_constant_p(bits) || (bits != 32 && bits != 128));
  ^~~~~~~~~~~~
In function ‘common_bits’,
    inlined from ‘add.part.1’ at /home/bruno/WireGuard/src/routingtable.c:215:9:
./include/linux/compiler.h:542:38: error: call to ‘__compiletime_assert_129’ declared with attribute error: BUILD_BUG_ON failed: !__builtin_constant_p(bits) || (bits != 32 && bits != 128)
  _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
                                      ^
./include/linux/compiler.h:525:4: note: in definition of macro ‘__compiletime_assert’
    prefix ## suffix();    \
    ^~~~~~
./include/linux/compiler.h:542:2: note: in expansion of macro ‘_compiletime_assert’
  _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
  ^~~~~~~~~~~~~~~~~~~
./include/linux/build_bug.h:46:37: note: in expansion of macro ‘compiletime_assert’
 #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
                                     ^~~~~~~~~~~~~~~~~~
./include/linux/build_bug.h:70:2: note: in expansion of macro ‘BUILD_BUG_ON_MSG’
  BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
  ^~~~~~~~~~~~~~~~
/home/bruno/WireGuard/src/routingtable.c:129:2: note: in expansion of macro ‘BUILD_BUG_ON’
  BUILD_BUG_ON(!__builtin_constant_p(bits) || (bits != 32 && bits != 128));
  ^~~~~~~~~~~~
make[2]: *** [scripts/Makefile.build:303: /home/bruno/WireGuard/src/routingtable.o] Error 1
make[1]: *** [Makefile:1515: _module_/home/bruno/WireGuard/src] Error 2
make[1]: Leaving directory '/usr/src/kernels/4.13.0-0.rc3.git0.1.fc27.i686+PAE'
make: *** [Makefile:28: module] Error 2

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Compile time assertion failure
  2017-08-02 12:19 Compile time assertion failure Bruno Wolff III
@ 2017-08-02 12:24 ` Bruno Wolff III
  2017-08-02 12:29   ` Bruno Wolff III
  0 siblings, 1 reply; 5+ messages in thread
From: Bruno Wolff III @ 2017-08-02 12:24 UTC (permalink / raw)
  To: wireguard

The problem seems to have been triggered by a recent (in the last few 
commits) rather than by a change to the Fedora kernel.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Compile time assertion failure
  2017-08-02 12:24 ` Bruno Wolff III
@ 2017-08-02 12:29   ` Bruno Wolff III
  2017-08-02 12:38     ` Jason A. Donenfeld
  0 siblings, 1 reply; 5+ messages in thread
From: Bruno Wolff III @ 2017-08-02 12:29 UTC (permalink / raw)
  To: wireguard

On Wed, Aug 02, 2017 at 07:24:30 -0500,
  Bruno Wolff III <bruno@wolff.to> wrote:
>The problem seems to have been triggered by a recent (in the last few 
>commits) rather than by a change to the Fedora kernel.

It starts happening with the following commit:

commit 18fe2082601b79cb27936b5910d2ef36cc94d5d3 (HEAD -> master)
Author: Jason A. Donenfeld <Jason@zx2c4.com>
Date:   Tue Aug 1 22:47:26 2017 +0200

    routingtable: demand optimization

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Compile time assertion failure
  2017-08-02 12:29   ` Bruno Wolff III
@ 2017-08-02 12:38     ` Jason A. Donenfeld
  2017-08-02 12:41       ` Bruno Wolff III
  0 siblings, 1 reply; 5+ messages in thread
From: Jason A. Donenfeld @ 2017-08-02 12:38 UTC (permalink / raw)
  To: Bruno Wolff III; +Cc: WireGuard mailing list

Hey Bruno,

Thanks for the report. Looks like I was relying on optimization
behavior of a gcc newer than yours. I'll revert.

Jason

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Compile time assertion failure
  2017-08-02 12:38     ` Jason A. Donenfeld
@ 2017-08-02 12:41       ` Bruno Wolff III
  0 siblings, 0 replies; 5+ messages in thread
From: Bruno Wolff III @ 2017-08-02 12:41 UTC (permalink / raw)
  To: Jason A. Donenfeld; +Cc: WireGuard mailing list

On Wed, Aug 02, 2017 at 14:38:59 +0200,
  "Jason A. Donenfeld" <Jason@zx2c4.com> wrote:
>
>Thanks for the report. Looks like I was relying on optimization
>behavior of a gcc newer than yours. I'll revert.

commit 107735eaea0f48c1f5bfc0a6ca82f1879a850b98 (HEAD -> master, origin/master, origin/HEAD)
Author: Jason A. Donenfeld <Jason@zx2c4.com>
Date:   Tue Aug 1 22:47:26 2017 +0200

    routingtable: unbloat BUG()
    
    Really isn't necessary.

fixes the problem for me. I tested building and connecting to another 
machine.

Thanks!

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-08-02 12:25 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-02 12:19 Compile time assertion failure Bruno Wolff III
2017-08-02 12:24 ` Bruno Wolff III
2017-08-02 12:29   ` Bruno Wolff III
2017-08-02 12:38     ` Jason A. Donenfeld
2017-08-02 12:41       ` Bruno Wolff III

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.