|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull Requests
Pull requests:
HistoryAllCommentsChangesGit/SVN commits
[2019-03-26 21:55 UTC] petk@php.net
[2019-03-26 22:07 UTC] krakjoe@php.net
[2019-03-26 22:07 UTC] krakjoe@php.net
-Status: Open
+Status: Closed
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 02:00:01 2025 UTC |
Description: ------------ phpdbg segfaults when attempting to run after setting a conditional breakpoint using the NUMERIC_PARAM (lineno only) format. # repro steps phpdbg -f script.php b @ 3 if $i > 1 r # further discussion phpdbg supports expressing non-conditional breakpoints in a number of different ways: file, method, opcode etc. The supported expression format for conditional breakpoints appears to be far less flexible. Currently, in order for a conditional breakpoint to work, the location param must be given as the absolute path to a file:lineno. Not doing so leads to surprising results (e.g. segfault or silent failure). Test script: --------------- <?php $i = 1; echo $i++; echo $i++; echo $i++; echo $i++; Expected result: ---------------- 1. phpdbg does not segfault even if breakpoint format input by the user is malformed or unsupported. 2. if a user attempts to set a breakpoint in a way that is unsupported, phpdbg immediately emits an error (as opposed to silently failing or failing later.) 3. to the extent that it's sensible, phpdbg should support expressing conditional breakpoints in all the same ways it is possible to express non-conditional breakpoints. Actual result: -------------- (gdb) bt #0 0x00007f0089d524c7 in kill () at ../sysdeps/unix/syscall-template.S:81 #1 0x0000000000841001 in zend_signal_handler (signo=signo@entry=11, siginfo=siginfo@entry=0x7fff3547edb0, context=context@entry=0x7fff3547ec80) at /usr/src/debug/php-src-php-7.1.18/Zend/zend_signal.c:209 #2 0x00000000008410db in zend_signal_handler_defer (signo=11, siginfo=0x7fff3547edb0, context=0x7fff3547ec80) at /usr/src/debug/php-src-php-7.1.18/Zend/zend_signal.c:106 #3 0x00007f008e06d5e0 in <signal handler called> () at /lib64/libpthread.so.0 #4 0x00000000008c0dae in phpdbg_export_breakpoints_to_string (str=str@entry=0x7fff3547f490) at /usr/src/debug/php-src-php-7.1.18/sapi/phpdbg/phpdbg_bp.c:235 #5 0x0000000000455fb1 in main (argc=3, argv=0x7fff3547f8e8) at /usr/src/debug/php-src-php-7.1.18/sapi/phpdbg/phpdbg.c:2010