[php-src] Issue #7854: Segfault with built-in webserver on one-arm match statement
| From: | Firehed | Date: | Wed, 29 Dec 2021 22:49:48 +0000 |
| Subject: | [php-src] Issue #7854: Segfault with built-in webserver on one-arm match statement | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-238644@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/7854
Comment Author: Firehed
Is this what you're looking for?
```
$ lldb
(lldb) target create php
Current executable set to 'php' (x86_64).
(lldb) settings set -- target.run-args "-S" "0.0.0.0:12345"
"repro.php"
(lldb) run
Process 33410 launched: '/usr/local/bin/php' (x86_64)
[Wed Dec 29 14:48:56 2021] PHP 8.1.0 Development Server (http://0.0.0.0:12345) started
[Wed Dec 29 14:49:00 2021] 127.0.0.1:62525 Accepted
Process 33410 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1,
address=0x8)
frame #0: 0x00000001003e311d php`sccp_visit_instr + 2969
php`sccp_visit_instr:
-> 0x1003e311d <+2969>: movb 0x8(%r13), %dl
0x1003e3121 <+2973>: cmpb $-0x1, %dl
0x1003e3124 <+2976>: je 0x1003e32c4 ; <+3392>
0x1003e312a <+2982>: movb 0x8(%r12), %cl
Target 0: (php) stopped.
(lldb)
```
I tried to follow what was done [here](https://bugs.php.net/bug.php?id=81006)