We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 849c741 commit 3690a80Copy full SHA for 3690a80
ext/opcache/jit/zend_jit_x86.dasc
@@ -1613,6 +1613,7 @@ static uint32_t ones32(uint32_t x)
1613
1614
static uint32_t floor_log2(uint32_t x)
1615
{
1616
+ ZEND_ASSERT(x != 0);
1617
x |= (x >> 1);
1618
x |= (x >> 2);
1619
x |= (x >> 4);
@@ -1623,7 +1624,7 @@ static uint32_t floor_log2(uint32_t x)
1623
1624
1625
static zend_bool is_power_of_two(uint32_t x)
1626
- return !(x & (x - 1));
1627
+ return !(x & (x - 1)) && x != 0;
1628
}
1629
1630
static zend_bool has_concrete_type(uint32_t value_type)
0 commit comments