From: Operating system: Mac OS X 10.6.7 PHP version: trunk-SVN-2011-12-09 (SVN) Package: Built-in web server Bug Type: Bug Bug description:Segfault after two multipart/form-data POST requestes, one 200 RQ and one 404
Description: ------------ Post two multipart/form-data to the cli-server, one 200 request and one 404 request will cause the cli-server segfault. if enabled debug, the server exit with a message: "in-consist hashtable". Test script: --------------- 1.Start the cli-server 2.Touch a simple empty php script 3.Make the requestes $ curl --form a=b "http://localhost:8000/file.php" $ curl --form a=b "http://localhost:8000/file-non-exist.php" Expected result: ---------------- Server response correctly. one 200 and one 404 reponse. Actual result: -------------- Correctly response the first request. but segfault after the second 404 request. (gdb) bt #0 0x0000000100250da5 in _zend_mm_free_int (heap=0x101000000, p=0x100670b60) at zend_alloc.c:2097 #1 0x0000000100224e4f in destroy_uploaded_files_hash () at rfc1867.c:199 #2 0x00000001002219f2 in sapi_deactivate () at SAPI.c:535 #3 0x0000000100306b5e in php_cli_server_send_error_page (server=0x7fff5fbfa560, client=0x100b51170, status=404) at php_cli_server.c:1755 #4 0x00000001003046ad in php_cli_server_dispatch [inlined] () at /Volumes/Dev/Opensources/php-src-5.4/sapi/cli/php_cli_server.c:1851 #5 0x00000001003046ad in php_cli_server_recv_event_read_request (server=0x7fff5fbfe790, client=0x100670b60) at php_cli_server.c:2180 #6 0x0000000100305ef5 in php_cli_server_do_event_for_each_fd_callback [inlined] () at /Volumes/Dev/Opensources/php-src-5.4/sapi/cli/php_cli_server.c:2271 #7 php_cli_server_do_event_for_each_fd [inlined] () at php_cli_server.c:767 #8 php_cli_server_poller_iter_on_active [inlined] () at /Volumes/Dev/Opensources/php-src-5.4/sapi/cli/php_cli_server.c:2302 #9 php_cli_server_do_event_loop [inlined] () at /Volumes/Dev/Opensources/php- src-5.4/sapi/cli/php_cli_server.c:2292 #10 0x0000000100305ef5 in do_cli_server (argc=4, argv=0x10) at php_cli_server.c:2403 #11 0x00000001002ffb94 in main (argc=1606414960, argv=0x7fff5fbff298) at php_cli.c:1359 -- Edit bug report at https://bugs.php.net/bug.php?id=60477&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=60477&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=60477&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=60477&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=60477&r=fixed Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=60477&r=needdocs Fixed in release: https://bugs.php.net/fix.php?id=60477&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=60477&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=60477&r=needscript Try newer version: https://bugs.php.net/fix.php?id=60477&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=60477&r=support Expected behavior: https://bugs.php.net/fix.php?id=60477&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=60477&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=60477&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=60477&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=60477&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=60477&r=dst IIS Stability: https://bugs.php.net/fix.php?id=60477&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=60477&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=60477&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=60477&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=60477&r=mysqlcfg
