Christoph M. Becker
cc9da62bdb
Merge branch 'PHP-5.6'
...
* PHP-5.6:
Fix #68291 : 404 on urls with '+'
Resolved conflicts:
sapi/cli/php_cli_server.c
2015-09-05 14:43:19 +02:00
Christoph M. Becker
fd94c92171
Fix #68291 : 404 on urls with '+'
...
URI paths have to be treated according to RFC 3986 by the CLI web server, not
as application/x-www-form-urlencoded.
2015-09-05 14:34:08 +02:00
Joe Watkins
85a511d2c1
fix zend signal and tsrm compat
2015-09-01 09:34:54 +01:00
Bob Weinand
84b608de10
Fix valgrind warning upon displaying lines from eval()ed code in phpdbg
2015-08-31 23:42:15 +02:00
Bob Weinand
54a831829a
Respect exit status for -rr option with phpdbg
2015-08-30 20:25:10 +02:00
Xinchen Hui
c359ca8c3d
Fixed printing
2015-08-27 11:38:11 +08:00
Bob Weinand
c1e9bd27fe
Fix zend_vm_call_opcode_handler (e.g. Generators throwing exceptions) with IP/FP registers
2015-08-26 00:25:25 +01:00
Anatol Belski
7366e29662
fix build, use exported symbol
2015-08-25 10:39:43 +02:00
Bob Weinand
6b3228fda4
Fix oplog with eval()ed code
2015-08-24 12:28:35 +01:00
Bob Weinand
272cccd175
Fix phpdbg_break_next()
2015-08-23 12:07:14 +01:00
Bob Weinand
e9f21a3388
Fix phpdbg_break_next() and add test
2015-08-23 11:58:45 +01:00
Bob Weinand
76e3e99dd6
Fix issues with phpdbg SIGINT handler
...
Also fix valgrind warnings in allocator when not using mmap()ed memory
2015-08-21 23:36:31 +01:00
Bob Weinand
82b73fd1e3
Remove assumption that extensions are in ext/ext-name
...
Fixes also a weird ln (symlink) hack for phpdbg
2015-08-21 00:13:02 +02:00
Christoph M. Becker
fc444896af
Merge branch 'PHP-5.6'
...
* PHP-5.6:
Fix #70264 : CLI server directory traversal
2015-08-14 17:18:35 +02:00
Christoph M. Becker
9c805a6cb3
Fix #70264 : CLI server directory traversal
...
On Windows the built-in webserver doesn't prevent directory traversal when
backslashes are used as path component separators. Even though that is not a
security issue (the CLI webserver is meant for testing only), we fix that by
replacing backslashes in the path with slashes on Windows, because backslashes
may be valid characters for file names on other systems, but not on Windows.
2015-08-14 17:05:31 +02:00
Dmitry Stogov
715d5d2855
Get rid of implicit type casting in GC_*() macros in Zend/zend_types.h.
...
This prevented compilation warnings and disclosed few incorrect usages in Zend/zend_vm_def.h and ext/dom/xpath.c.
Now explicit type casting may be required on call site.
This may break some C extension code, but it shoulfn't be a problem to add explicit casting.
2015-08-13 13:56:29 +03:00
Bob Weinand
c17afbc4f1
Fix valgrind false positives with watchpoints
2015-08-12 10:42:49 +00:00
Christoph M. Becker
48c71cd94b
Fix #69487 : SAPI may truncate POST data
...
If SG(request_info).request_body can't be completely written (e.g. due to a
full drive), only parts of the POST data will be available. This patch changes
this, so that SG(request_info).request_body will be reset in this case, and a
warning will be thrown.
2015-08-11 01:32:13 +02:00
wusuopu
72976e2497
Fix #66606 : Sets HTTP_CONTENT_TYPE but not CONTENT_TYPE
...
The patch will store Content-Type header value in both HTTP_CONTENT_TYPE field and CONTENT_TYPE field.
2015-08-09 02:37:16 +02:00
Christoph M. Becker
1b4a80332c
added tests for bug #66606
2015-08-09 02:36:58 +02:00
Stanislav Malyshev
54187fa4b9
Merge branch 'PHP-5.5' into PHP-5.6
...
* PHP-5.5:
fix test
2015-08-04 16:45:55 -07:00
Stanislav Malyshev
2425f88afd
Merge branch 'PHP-5.4' into PHP-5.5
...
* PHP-5.4:
fix test
2015-08-04 16:45:32 -07:00
Stanislav Malyshev
da5321013c
fix test
2015-08-04 16:45:20 -07:00
Stanislav Malyshev
ed709d5aa0
Merge branch 'PHP-5.5' into PHP-5.6
...
* PHP-5.5:
update NEWS
fix test
update NEWS
Fix bug #70019 - limit extracted files to given directory
Do not do convert_to_* on unserialize, it messes up references
Fix #69793 - limit what we accept when unserializing exception
Fixed bug #70169 (Use After Free Vulnerability in unserialize() with SplDoublyLinkedList)
Fixed bug #70166 - Use After Free Vulnerability in unserialize() with SPLArrayObject
ignore signatures for packages too
Fix bug #70168 - Use After Free Vulnerability in unserialize() with SplObjectStorage
Fixed bug #69892
Fix bug #70014 - use RAND_bytes instead of deprecated RAND_pseudo_bytes
Improved fix for Bug #69441
Fix bug #70068 (Dangling pointer in the unserialization of ArrayObject items)
Fix bug #70121 (unserialize() could lead to unexpected methods execution / NULL pointer deref)
Fix bug #70081 : check types for SOAP variables
Conflicts:
ext/soap/php_http.c
ext/spl/spl_observer.c
2015-08-04 15:29:13 -07:00
Stanislav Malyshev
742c54aecf
Merge branch 'PHP-5.4' into PHP-5.5
...
* PHP-5.4:
fix test
update NEWS
2015-08-04 14:46:30 -07:00
Stanislav Malyshev
0a21b5d970
fix test
2015-08-04 14:46:19 -07:00
Bob Weinand
af0d6256d5
Fix [valid] valgrind warnings, add first watchpoints test
2015-07-15 14:22:51 +00:00
Dmitry Stogov
162bf9e802
Reimplemented ability to get debug info (C source file and line number) in phpdbg without hacks and ABI breaks.
2015-08-11 16:33:47 +03:00
Christoph M. Becker
37707b2dd6
Merge branch 'PHP-5.6'
...
* PHP-5.6:
Fix #69487 : SAPI may truncate POST data
2015-08-11 01:42:25 +02:00
Christoph M. Becker
fc69549593
Merge branch 'PHP-5.6'
...
* PHP-5.6:
Fix #66606 : Sets HTTP_CONTENT_TYPE but not CONTENT_TYPE
added tests for bug #66606
2015-08-09 02:51:16 +02:00
Bob Weinand
0c60524190
Fixed bug #70214 (FASYNC possibly not defined)
2015-08-08 15:53:27 +02:00
Stanislav Malyshev
6981bc32be
fix test
2015-08-04 16:47:44 -07:00
Stanislav Malyshev
21602ec219
Merge branch 'PHP-5.6'
...
* PHP-5.6:
fix test
Conflicts:
sapi/cli/tests/005.phpt
2015-08-04 16:46:38 -07:00
Stanislav Malyshev
97047e7665
Merge branch 'PHP-5.6'
...
* PHP-5.6:
update NEWS
fix test
update NEWS
Fix bug #70019 - limit extracted files to given directory
Do not do convert_to_* on unserialize, it messes up references
Fix #69793 - limit what we accept when unserializing exception
Fixed bug #70169 (Use After Free Vulnerability in unserialize() with SplDoublyLinkedList)
Fixed bug #70166 - Use After Free Vulnerability in unserialize() with SPLArrayObject
ignore signatures for packages too
Fix bug #70168 - Use After Free Vulnerability in unserialize() with SplObjectStorage
Fixed bug #69892
Fix bug #70014 - use RAND_bytes instead of deprecated RAND_pseudo_bytes
Improved fix for Bug #69441
Fix bug #70068 (Dangling pointer in the unserialization of ArrayObject items)
Fix bug #70121 (unserialize() could lead to unexpected methods execution / NULL pointer deref)
Fix bug #70081 : check types for SOAP variables
Conflicts:
Zend/zend_exceptions.c
ext/date/php_date.c
ext/openssl/openssl.c
ext/phar/phar_internal.h
ext/soap/php_http.c
ext/spl/spl_array.c
ext/spl/spl_dllist.c
ext/spl/spl_observer.c
ext/standard/tests/serialize/bug69152.phpt
sapi/cli/tests/005.phpt
2015-08-04 16:14:24 -07:00
Bob Weinand
d0ad621906
Fix further leaks
2015-08-04 01:22:04 +02:00
Bob Weinand
d8fe645db4
Fix valgrind errors in phpdbg
...
Revert "We cannot safely assume that all op array will be refcount 0 after execution"
This reverts commit b6936adb58
.
This change turns out to not have been a clever idea and was causing more weirdness than it helped...
2015-08-04 00:00:10 +02:00
Bob Weinand
b20953118b
Fix last invalid read
...
Also revert debugging run-tests.php changes...
2015-08-03 20:49:41 +02:00
Bob Weinand
b5e16cebda
Fix a few valgrind errors in phpdbg
2015-08-03 20:27:46 +02:00
Bob Weinand
34596a3ddd
Fix breaking on HANDLE_EXCEPTION (opline_before_exception)
2015-08-03 17:15:40 +02:00
Dmitry Stogov
d28070870c
Fixed tests (system dependent numbers are replaced with %d)
2015-08-03 09:53:13 +03:00
Anatol Belski
8e528b2792
fix inconsistent dll linkage
2015-08-02 16:26:48 +02:00
Bob Weinand
06ef2aeca9
Skip shebang line if present
2015-08-01 23:28:55 +02:00
Bob Weinand
351b4e8015
Optimize btree/find_closest a bit
2015-08-01 18:23:00 +02:00
Bob Weinand
624bedcadc
Fix tests
2015-07-31 18:22:04 +02:00
Bob Weinand
590c5a7e50
Remove debug instructions (...)
2015-07-31 13:23:45 +02:00
Bob Weinand
36aa92a67d
Do not mark automatic return 1; as executable
2015-07-31 02:26:28 +02:00
Bob Weinand
1da4ee25b8
Fix oplog trace with already freed closures
2015-07-31 02:06:03 +02:00
Christoph M. Becker
6855e2f08b
Merge branch 'pull-request/1439'
...
* pull-request/1439:
fixed broken test
add new error constant PREG_JIT_STACKLIMIT_ERROR
2015-07-29 18:21:46 +02:00
Bob Weinand
9a312687f0
Fix test execution result with opcache
2015-07-28 02:14:49 +02:00
Bob Weinand
c0e0f1414e
Fix phpdbg stepping on CATCH with exception
2015-07-28 00:10:42 +02:00
Bob Weinand
248ebf0df6
Fix: A buf == NULL on filehandle will segfault
2015-07-27 16:57:09 +02:00
Bob Weinand
64f25adb6b
Remove -Wunused-result warnings
2015-07-27 15:02:01 +02:00
Christoph M. Becker
6de470e0af
fixed broken test
2015-07-26 23:40:48 +02:00
Bob Weinand
70c6a6f624
Fix infinite lexer loop for :\ sequence in phpdbg
2015-07-26 22:57:30 +02:00
Bob Weinand
f5bef4058c
Fix bug #70138 (difference between gcc and clang)
2015-07-26 21:49:18 +02:00
Bob Weinand
9e8fec1ef7
Fix leaks from bug #70138
2015-07-26 21:49:18 +02:00
Anatol Belski
c18f5e1edd
add NULL check
2015-07-26 20:54:26 +02:00
Bob Weinand
66fd52939b
Just always copy the buffer, that makes it much safer
...
At least compared to conditionally using the mmap()ped input
2015-07-25 19:50:31 +02:00
Bob Weinand
cdde4c51e1
Remove old unused header file
2015-07-25 01:35:29 +02:00
Bob Weinand
e960d3ed2c
Fix memory leak with opcache
2015-07-25 01:08:57 +02:00
Bob Weinand
b4c595dd82
Fix op_arrays with opcache
2015-07-25 00:31:05 +02:00
Bob Weinand
cf85985935
Fix print of ZEND_CATCH
2015-07-24 23:40:18 +02:00
Anatol Belski
9bae11d170
Revert "avoid pointer truncation"
...
This reverts commit 5334d53499
.
2015-07-24 22:30:46 +02:00
Anatol Belski
fa4cd519e6
fix printf format
2015-07-24 21:51:30 +02:00
Anatol Belski
5334d53499
avoid pointer truncation
2015-07-24 21:51:29 +02:00
Anatol Belski
05496c7312
fix scope
2015-07-24 21:51:28 +02:00
Bob Weinand
f1698eedce
Fix non-debug build
2015-07-24 17:51:46 +02:00
Bob Weinand
76b882f0fc
Use relative paths in phpdbg_lexer.c
2015-07-24 17:33:45 +02:00
Bob Weinand
13525328ed
Cleanup shutdown, enable proper memory leak displaying
...
phpdbg should not memory leak...
2015-07-24 17:17:26 +02:00
Bob Weinand
9005b24aed
Fix build failure for non-osx *nixes
2015-07-23 14:55:13 +02:00
Bob Weinand
6704d8d421
Fix valgrind warning with sigaction
2015-07-23 14:26:50 +02:00
Bob Weinand
b7e8f65972
Fix printf format issues on 32 bit
2015-07-23 14:23:42 +02:00
Xinchen Hui
3fe35ba80d
Make IS_TMP_VAR and IS_VAR differentiable
2015-07-23 11:36:46 +08:00
Bob Weinand
686b9039a6
Fix phpdbg test failure and crash with opcache
2015-07-23 01:03:03 +02:00
Bob Weinand
3cc02533ae
Add phpdbg_get_executable() (gets executable ops/lines)
2015-07-22 18:11:35 +02:00
Bob Weinand
d6415ae473
Always lowercase function names for lookup in phpdbg -p
2015-07-22 15:33:44 +02:00
Bob Weinand
264bed40a7
Fix opcode tests which may generate FCALL instead of ICALL
2015-07-22 13:49:28 +02:00
Bob Weinand
0da4a3ec2c
Add -e (ZEND_EXT_* generation) option to phpdbg
2015-07-22 13:46:06 +02:00
Xinchen Hui
f56b89b0af
Fixed opcodes printing.
...
-p"function"
-p"class::"
-p"class::method"
2015-07-22 19:13:26 +08:00
Bob Weinand
262d32634b
Undefined values may lead to big allocation
2015-07-22 00:02:59 +02:00
Nikita Popov
7c661bd304
Remove FAST_CALL_FROM_CATCH
...
This was generated for a return from a try block with both a catch
and a finally. However at this point no exception can be active,
because it either didn't exist in the first place or was explicitly
discarded using DISCARD_EXCEPTION.
2015-07-21 21:13:34 +02:00
Bob Weinand
b8534daa31
Exclude opcache from a few opcode related tests
2015-07-21 00:06:34 +02:00
Bob Weinand
80bb4fd45a
Fix various Windows issues (e.g. dir separators)
2015-07-20 23:26:45 +02:00
Bob Weinand
7aa2be060c
Fix readline/libedit build
2015-07-20 22:45:05 +02:00
Bob Weinand
f0b50963e5
Do not use readline when not having a tty
...
This is important for e.g. run-tests.php
2015-07-20 21:57:00 +02:00
Bob Weinand
6aadeba213
Add show_unexecuted option to phpdbg_end_oplog()
2015-07-20 20:41:07 +02:00
Bob Weinand
378a05f0de
Move phpdbg tests to .phpt mechanism
...
Also add a few more in-depth tests related to $argv, breakpoints and uncaught exceptions
2015-07-20 18:00:43 +02:00
Bob Weinand
75a3de0cd8
Fix misbehaviors with uncaught exceptions and finally or eval
2015-07-20 18:00:43 +02:00
Bob Weinand
4dc0546a59
Preserve argv consistency over multiple runs
2015-07-20 18:00:43 +02:00
Bob Weinand
acba295088
Fix info vars with refs/indirects
2015-07-20 18:00:43 +02:00
Bob Weinand
22c7c1189a
Fix function/method breakpoint case sensitivity issues
2015-07-20 18:00:43 +02:00
Bob Weinand
50e76d951e
Always only halt upon first non-recv opcode in a function
2015-07-20 18:00:42 +02:00
Bob Weinand
1f9bba68a9
Make opcode breakpoints work again
2015-07-20 18:00:42 +02:00
Bob Weinand
e3cd0709db
Do never clean stdin buffer away
2015-07-20 18:00:42 +02:00
Bob Weinand
dee629c92d
Fix use of already freed hashtable (wrong variable)
2015-07-20 18:00:42 +02:00
Bob Weinand
699e641e93
Do not show "Script ended normally" upon forced rerun
2015-07-20 18:00:42 +02:00
Bob Weinand
6435eb8019
Do not display compilation success / normal script end in -rr mode
2015-07-20 18:00:42 +02:00
Nikita Popov
e97cb1427f
Remove dead goto label in phpdbg_cmd.c
2015-07-17 16:53:07 +02:00
Nikita Popov
20e5027293
Switch asprintf to spprintf in phpdbg opcode dump
...
Also use %td where appropriate, a lot of the values are ptrdiff
based.
Fix a leak in phpdbg_frame.c.
2015-07-17 16:53:07 +02:00
Bob Weinand
c13124cc0f
Cleanup exception displaying code in phpdbg
2015-07-16 10:28:59 +02:00