derickr / vld

BSD 2-Clause "Simplified" License
464 stars 87 forks source link

7.4/0.16 - segfaults in vld_find_jumps #46

Closed SjonHortensius closed 4 years ago

SjonHortensius commented 4 years ago

Using php-7.4 and vld-0.16 using this script as input:

<?php

function getFormatForInterval(String $intervalString): String
{
    switch ($intervalString) {
        case 'P1Y':
            return 'Y';
        case 'P1M':
            return 'Y-m';
        case 'P1W':
            return 'Y-W';
        case 'P1D':
            return 'Y-m-d';
        case 'PT1H':
            return 'Y-m-d ha';
    }
}

extracted from https://3v4l.org/lEtDf

#0  0x00007ffff7fc71c2 in vld_find_jumps () from ./modules/vld.so
#1  0x00007ffff7fc73da in vld_analyse_branch () from ./modules/vld.so
#2  0x00007ffff7fc7767 in vld_analyse_oparray () from ./modules/vld.so
#3  0x00007ffff7fc7b7e in vld_dump_oparray () from ./modules/vld.so
#4  0x00007ffff7fc5c47 in ?? () from ./modules/vld.so
#5  0x00005555559e8286 in zend_hash_apply_with_arguments ()
#6  0x00007ffff7fc5653 in ?? () from ./modules/vld.so
#7  0x00005555559d73ec in zend_execute_scripts ()
#8  0x00005555559775c1 in php_execute_script ()
#9  0x0000555555a5f9ac in ?? ()
#10 0x000055555578f2f7 in ?? ()
#11 0x00007ffff7655153 in __libc_start_main () from /usr/lib/libc.so.6
#12 0x000055555578fa1e in _start ()
derickr commented 4 years ago

This looks already fixed in this Git repository. Just checkout the master branch.