Date: Fri, 10 Aug 2018 11:59:06 -0400 From: Rich Felker <dalias@...c.org> To: musl@...ts.openwall.com Subject: Re: boost 1.67 with static_assert(!WIFSIGNALED(0x7f)) On Fri, Aug 10, 2018 at 05:45:33PM +0200, Natanael Copa wrote: > Hi, > > Boost 1.67 introduced this compile time assert: > https://github.com/boostorg/process/commit/6625999765bbe24cc9e255bdeb284ea82d5f2258 > > > > static_assert(!WIFEXITED(still_active) && !WIFSIGNALED(still_active), "Internal Error"); As noted on #musl, I don't think this is even valid as a static assertion, because POSIX imposes no requirement that these macros produce constant expressions. As far as I can tell they could be implemented as function calls. > This was apparently introduced to prevent that WIFSIGNALED clashes with WIFSTOPPED. This seems correct -- POSIX defines WIFSIGNALED only for when the process terminated with a signal, which is of course mutually exclusive with being stopped. > On musl this results into: > > /usr/include/boost/process/detail/posix/is_running.hpp:20:1: error: static assertion failed: Internal Error > static_assert(!WIFEXITED(still_active) && !WIFSIGNALED(still_active), "Internal Error"); > ^~~~~~~~~~~~~ > > I wonder if the boost change is wrong or if musl WIFSIGNALED(0x7f) is buggy? I'll have to look into whether 0x7f is a value that can actually be seen. If so, one or both of the musl macros has a bug. If not, this seems like a spurious failure based on incorrect assumptions in boost. I'll follow up after doing some more research if nobody else gets to it first. Rich
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.