Re: [PHP-DEV] Weird bitset shift offset in zend_alloc

2019-03-06 Thread Stanislav Malyshev
Hi! > But I'm not sure how it's supposed to work. Is it correct that on GCC > (and clang, presumably, since it defines __GNUC__) accept long bitshifts > and do the right thing with argument like 138? Is it documented > anywhere? Or is there a bug here? > > > This is a bug, yes.

Re: [PHP-DEV] Weird bitset shift offset in zend_alloc

2019-03-06 Thread Nikita Popov
On Wed, Mar 6, 2019 at 1:28 AM Stanislav Malyshev wrote: > Hi! > > I've been working on running PHP with undefined behavior sanitizer > (http://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html) and I've > encountered a weird error while running PHP: > > /src/php-src/Zend/zend_alloc.c:585:9:

[PHP-DEV] Weird bitset shift offset in zend_alloc

2019-03-05 Thread Stanislav Malyshev
Hi! I've been working on running PHP with undefined behavior sanitizer (http://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html) and I've encountered a weird error while running PHP: /src/php-src/Zend/zend_alloc.c:585:9: runtime error: shift exponent 138 is too large for 64-bit type