[php-src] Issue #15923: GDB: Python Exception <class 'TypeError'>: exceptions must derive from BaseException
| From: | DanielEScherzer | Date: | Mon, 16 Sep 2024 17:41:49 +0000 |
| Subject: | [php-src] Issue #15923: GDB: Python Exception <class 'TypeError'>: exceptions must derive from BaseException | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-247805@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/15923
Author: DanielEScherzer
### Description
The following code:
```php
<?php
$a = 1;
var_dump( $a );
```
in
/var/www/html/test.php. when run with GDB:
```
(gdb) set print pretty on
(gdb) break /usr/src/php/ext/standard/var.c:105
Breakpoint 1 at 0x4b6130: file /usr/src/php/ext/standard/var.c, line 105.
(gdb) run /var/www/html/test.php
Starting program: /usr/local/bin/php /var/www/html/test.php
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Breakpoint 1, php_var_dump (struc=0x7ffff54140f0, level=1) at /usr/src/php/ext/standard/var.c:113
113 if (level > 1) {
(gdb) p *struc
```
Where var.c:113 at the time was https://github.com/php/php-src/blob/c65e042c0b2c664e93581eb91fc14672e8efff32/ext/standard/var.c#L113
Resulted in this output:
```
$1 = Python Exception <class 'TypeError'>: exceptions must derive from BaseException
Python Exception <class 'TypeError'>: exceptions must derive from BaseException
{
value = {
lval = 1,
...
}
```
But I expected this output instead:
```
No errors
```
### PHP Version
PHP 8.4-dev
### Operating System
_No response_