Skip to content

Instantly share code, notes, and snippets.

@robertbasic
Created February 24, 2012 23:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save robertbasic/1904467 to your computer and use it in GitHub Desktop.
Save robertbasic/1904467 to your computer and use it in GitHub Desktop.
PHP #53823
(gdb) break php_pcre.c:1318
Breakpoint 1 at 0x49e066: file /home/robert/php/php5trunk/ext/pcre/php_pcre.c, line 1318.
(gdb) run run-tests.php ext/pcre/tests/bug53823.phpt
<<snip>>
Breakpoint 1, preg_replace_impl (ht=3, return_value=0x7ffff1971518, return_value_ptr=0x0, this_ptr=0x0, return_value_used=1, is_callable_replace=0,
is_filter=0) at /home/robert/php/php5trunk/ext/pcre/php_pcre.c:1318
1318 if (!is_callable_replace && Z_TYPE_PP(replace) == IS_ARRAY && Z_TYPE_PP(regex) != IS_ARRAY) {
(gdb) print **subject
$1 = {value = {lval = 140737353933000, dval = 6.9533491664895744e-310, str = {
val = 0x7ffff7fce0c8 "string(6) \"\303\303\303\303ú\"\nstring(10) \"áéíóú\"", len = 42}, ht = 0x7ffff7fce0c8, obj = {
handle = 4160544968, handlers = 0x7fff0000002a}}, refcount__gc = 1, type = 6 '\006', is_ref__gc = 0 '\000'}
(gdb) continue
Continuing.
Breakpoint 1, preg_replace_impl (ht=3, return_value=0x7ffff19720e0, return_value_ptr=0x0, this_ptr=0x0, return_value_used=1, is_callable_replace=0,
is_filter=0) at /home/robert/php/php5trunk/ext/pcre/php_pcre.c:1318
1318 if (!is_callable_replace && Z_TYPE_PP(replace) == IS_ARRAY && Z_TYPE_PP(regex) != IS_ARRAY) {
(gdb) print **subject
$2 = {value = {lval = 140737353933000, dval = 6.9533491664895744e-310, str = {
val = 0x7ffff7fce0c8 "string(10) \"áéíóú\"\nstring(10) \"áéíóú\"", len = 47}, ht = 0x7ffff7fce0c8, obj = {handle = 4160544968,
handlers = 0x2f}}, refcount__gc = 2, type = 6 '\006', is_ref__gc = 0 '\000'}
(gdb)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment