Fix #77800: phpdbg segfaults on listing some conditional breakpoints#3992
Fix #77800: phpdbg segfaults on listing some conditional breakpoints#3992mlauter wants to merge 1 commit intophp:masterfrom
Conversation
Fixes segfault when attempting to run after setting a conditional breakpoint without specifying the file path. Additionally, adds functionality so that NUMERIC_PARAM breakpoints are supported in addition to FILE type. Emits an error if other conditional breakpoint formats are used as they are currently unsupported.
|
Fixed in 7df8e4f I didn't add support for numeric param, it would seem ambiguous ... it's clear in a single script test file which line you want to break on, but in a realistic application it's not clear at all which file you want to break on. |
|
That's fair, though it seems equally ambiguous for conditional and non-conditional bps. But I agree it doesn't seem very realistic that someone would want to do it. That said I don't think 7df8e4f fully fixes supporting the different bp types for conditional breakpoints since PHPDBG_BREAK(at) doesn't do the work the various |
|
In such case if it is not fully fixed yet, we can also reopen the bug report... |
|
@krakjoe what would you think about an approach such that conditional breakpoints shared more of the code path with regular breakpoints so that the handling would not have to be duplicated? (e.g. stuff in https://github.com/php/php-src/blob/master/sapi/phpdbg/phpdbg_bp.c#L419) |
|
I've addressed that in 6d3a2b4 Oh I think I see the confusion ... conditional breakpoints are by nature a slow path, that's why, rather than using the same break tables as non-conditional breaks, they have a separate table ... the support for different types of conditional breakpoints is here, called in this path ... They were lost on subsequent runs, which is what the commit above fixes ... |
Fixes segfault when attempting to run after setting a conditional breakpoint
without specifying the file path.
Additionally, adds functionality so that NUMERIC_PARAM breakpoints
are supported in addition to FILE type. Emits an error if
other conditional breakpoint formats are used as they are currently
unsupported.