PHP  
 PHP_HEAD
downloads | QA | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
 

Valgrind Report for ext/opcache/tests/jit/shift_left_002.phpt ('JIT Shift Left: 002')

Script

1: <?php
2:
function shl0(int $a) {
3:     return 
$a << 0;
4: }
5: function 
shl1(int $a) {
6:     return 
$a << 1;
7: }
8: function 
shl2(int $a) {
9:     return 
$a << 2;
10: }
11: function 
shl64(int $a) {
12:     return 
$a << 64;
13: }
14: function 
shlNEG(int $a) {
15:     return 
$a << -1;
16: }
17:
var_dump(shl0(1));
18:
var_dump(shl1(1));
19:
var_dump(shl2(1));
20:
var_dump(shl2(-1));
21: try {
22:     
var_dump(shl64(1));
23: } catch (
Throwable $e) {
24:     echo 
"Exception " $e->getMessage() . "\n";
25: }
26: try {
27:     
var_dump(shlNEG(1));
28: } catch (
Throwable $e) {
29:     echo 
"Exception (" get_class($e) . "): " $e->getMessage() . "\n";
30: }
31:
?>
32:

Report

==26440== Conditional jump or move depends on uninitialised value(s)
==26440==    at 0x10271CF: zval_ptr_dtor_nogc (zend_variables.h:34)
==26440==    by 0x10271CF: ZEND_HANDLE_EXCEPTION_SPEC_HANDLER (zend_vm_execute.h:1983)
==26440==    by 0x1DA55048: ???
==26440==    by 0x1197C83: zend_execute (zend_vm_execute.h:66602)
==26440==    by 0xF27316: zend_execute_scripts (zend.c:1629)
==26440==    by 0xE15279: php_execute_script (main.c:2650)
==26440==    by 0x119DB6F: do_cli (php_cli.c:985)
==26440==    by 0x119F611: main (php_cli.c:1375)
==26440== 

 

Generated at Mon, 06 May 2019 17:58:35 +0000 (295 days ago)

Copyright © 2005-2020 The PHP Group
All rights reserved.