{"action":"closed","issue":{"url":"https://api.github.com/repos/derickr/vld/issues/33","repository_url":"https://api.github.com/repos/derickr/vld","labels_url":"https://api.github.com/repos/derickr/vld/issues/33/labels{/name}","comments_url":"https://api.github.com/repos/derickr/vld/issues/33/comments","events_url":"https://api.github.com/repos/derickr/vld/issues/33/events","html_url":"https://github.com/derickr/vld/issues/33","id":314091181,"number":33,"title":"Vld raise a segment fault when i run this following script","user":{"login":"Ph0enixxx","id":10331114,"avatar_url":"https://avatars2.githubusercontent.com/u/10331114?v=4","gravatar_id":"","url":"https://api.github.com/users/Ph0enixxx","html_url":"https://github.com/Ph0enixxx","followers_url":"https://api.github.com/users/Ph0enixxx/followers","following_url":"https://api.github.com/users/Ph0enixxx/following{/other_user}","gists_url":"https://api.github.com/users/Ph0enixxx/gists{/gist_id}","starred_url":"https://api.github.com/users/Ph0enixxx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ph0enixxx/subscriptions","organizations_url":"https://api.github.com/users/Ph0enixxx/orgs","repos_url":"https://api.github.com/users/Ph0enixxx/repos","events_url":"https://api.github.com/users/Ph0enixxx/events{/privacy}","received_events_url":"https://api.github.com/users/Ph0enixxx/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-04-13T12:38:26Z","updated_at":"2018-04-15T08:47:29Z","closed_at":"2018-04-15T08:47:29Z","author_association":"NONE","body":"emmmm... it seems like a pointer problem.\r\n\r\nscript `a.php`:\r\n\r\n````php\r\n<?php\r\n#error_reporting(0);\r\n$a = 12345;\r\nfunction asd(){\r\n\treturn 123111;\r\n}\r\necho asd();\r\necho \"123\";\r\nclass AA{\r\n\tpublic function t(){echo 1236666;}\r\n};\r\n#eval($_GET['asd']);\r\neval(\"echo 123;\");  // problem is here\r\n\r\n$b = new AA();\r\n$b->t();\r\n````\r\n\r\nrun php with vld:\r\n````\r\nphp -dvld.active=1 -dvld.execute=1  -S 0.0.0.0:8080\r\n````\r\n\r\nthen run curl twice:\r\n\r\n`curl 127.0.0.1:8080/a.php?asd=echo 123;`\r\n\r\n\r\nthe problem code is here:\r\n````c\r\nstatic zend_op_array *vld_compile_string(zval *source_string, char *filename TSRMLS_DC)\r\n{\r\n\tzend_op_array *op_array;\r\n\r\n\top_array = old_compile_string (source_string, filename TSRMLS_CC);  // here\r\n\r\n\tif (op_array) {\r\n\t\tvld_dump_oparray (op_array TSRMLS_CC);\r\n\r\n// #if defined(ZEND_ENGINE_3)\r\n// \t\tzend_hash_apply_with_arguments (CG(function_table) APPLY_TSRMLS_CC, (apply_func_args_t) vld_dump_fe_wrapper, 0);\r\n// \t\tzend_hash_apply (CG(class_table), (apply_func_t) vld_dump_cle_wrapper TSRMLS_CC);\r\n// #else\r\n// \t\tzend_hash_apply_with_arguments (CG(function_table) APPLY_TSRMLS_CC, (apply_func_args_t) vld_dump_fe, 0);\r\n// \t\tzend_hash_apply (CG(class_table), (apply_func_t) vld_dump_cle TSRMLS_CC);\r\n// #endif\r\n\t}\r\n\r\n\treturn op_array;\r\n}\r\n\r\n````\r\n\r\nhow to fix it?   My OS is OS X 10.12.6    PHP version is 7.1.16"}}
{"actor":{"display_login":"derickr"}}