{"id":472573,"date":"2025-08-29T15:00:19","date_gmt":"2025-08-29T15:00:19","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=472573"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=472573","title":{"rendered":"<span>\u0427\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c, \u0435\u0441\u043b\u0438 \u0432\u0430\u0448 \u0441\u043b\u043e\u043d \u0434\u0443\u043c\u0430\u0435\u0442, \u0447\u0442\u043e \u043e\u043d \u0431\u0430\u0433?<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041c\u044b \u043e\u043a\u0443\u043d\u0443\u043b\u0438\u0441\u044c \u0432 \u0432\u0435\u0431-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u0438 \u043d\u0430\u0448\u043b\u0438 \u0442\u0430\u043c \u043d\u0435\u043e\u0431\u044b\u0447\u043d\u043e\u0435 \u0436\u0438\u0432\u043e\u0442\u043d\u043e\u0435. \u042d\u0442\u043e \u0431\u044b\u043b \u0441\u043b\u043e\u043d \u0441 \u043f\u043e\u0432\u0430\u0434\u043a\u0430\u043c\u0438 \u0431\u0430\u0433\u0430. \u041c\u044b \u0438\u0437\u0443\u0447\u0438\u043b\u0438 \u043a\u043e\u0434 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 PHP \u0438 \u043f\u043e\u043d\u044f\u043b\u0438, \u0432 \u0447\u0451\u043c \u0434\u0435\u043b\u043e. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0432\u043c\u0435\u0441\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u043d\u0435\u043e\u0431\u044b\u0447\u043d\u044b\u0435 \u0441\u043b\u0443\u0447\u0430\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043a \u043d\u0435\u043e\u0436\u0438\u0434\u0430\u043d\u043d\u044b\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u043c.<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/\/post_images\/4b1\/690\/ab3\/4b1690ab3759f5057078a27e74c7aa69.png\" sizes=\"(max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/\/post_images\/4b1\/690\/ab3\/4b1690ab3759f5057078a27e74c7aa69.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/\/post_images\/4b1\/690\/ab3\/4b1690ab3759f5057078a27e74c7aa69.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<h3>\u041e \u043f\u0440\u043e\u0435\u043a\u0442\u0435<\/h3>\n<p><a href=\"https:\/\/github.com\/php\/php-src\" rel=\"noopener noreferrer nofollow\">PHP<\/a> \u2014 \u043e\u0434\u0438\u043d \u0438\u0437 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u0441\u0446\u0435\u043d\u0430\u0440\u043d\u044b\u0445 \u044f\u0437\u044b\u043a\u043e\u0432 \u0432 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0432\u0435\u0431-\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u043e\u0439 \u0447\u0430\u0441\u0442\u0438. \u042f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c \u0441 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u043c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c, \u0438 \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u043e\u043f\u0430\u043b \u0432 \u043d\u0430\u0448\u0438 \u0440\u0443\u043a\u0438.<\/p>\n<p>\u041f\u0430\u0440\u0443 \u043b\u0435\u0442 \u043d\u0430\u0437\u0430\u0434 \u043c\u044b \u0443\u0436\u0435 <a href=\"https:\/\/pvs-studio.ru\/ru\/blog\/posts\/cpp\/0392\/\" rel=\"noopener noreferrer nofollow\">\u043f\u0440\u043e\u0432\u0435\u0440\u044f\u043b\u0438<\/a> \u044d\u0442\u043e\u0442 \u043f\u0440\u043e\u0435\u043a\u0442, \u043d\u043e \u0432\u0440\u0435\u043c\u044f \u043d\u0435 \u0441\u0442\u043e\u0438\u0442 \u043d\u0430 \u043c\u0435\u0441\u0442\u0435: \u043f\u0440\u043e\u0434\u0443\u043a\u0442 \u0440\u0430\u0437\u0432\u0438\u0432\u0430\u0435\u0442\u0441\u044f, \u043d\u0430\u0448\u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0441\u0442\u0430\u043d\u043e\u0432\u044f\u0442\u0441\u044f \u0443\u043c\u043d\u0435\u0435, \u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u043d\u0430\u0445\u043e\u0434\u044f\u0442 \u043d\u043e\u0432\u044b\u0435 \u0441\u043f\u043e\u0441\u043e\u0431\u044b \u0432\u044b\u0441\u0442\u0440\u0435\u043b\u0438\u0442\u044c \u0441\u0435\u0431\u0435 \u0432 \u043d\u043e\u0433\u0443.<\/p>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0433\u043e\u0432\u043e\u0440\u0438\u0442\u044c \u043f\u0440\u043e \u044f\u0437\u044b\u043a\u0438 C \u0438 C++, \u0433\u0434\u0435 \u043d\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043f\u043e\u0434\u0436\u0438\u0434\u0430\u0435\u0442 \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u043c \u0443\u0433\u043b\u0443. \u041d\u0435\u0434\u0430\u0432\u043d\u043e \u043c\u044b \u0434\u0430\u0436\u0435 \u0432\u044b\u043f\u0443\u0441\u0442\u0438\u043b\u0438 \u043e\u0431 \u044d\u0442\u043e\u043c \u0446\u0435\u043b\u0443\u044e \u043a\u043d\u0438\u0433\u0443 &#171;<a href=\"https:\/\/pvs-studio.ru\/ru\/blog\/posts\/cpp\/1215\/\" rel=\"noopener noreferrer nofollow\">\u041f\u0443\u0442\u0435\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c C++ \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u0430 \u043f\u043e \u043d\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u043c\u0443 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044e<\/a>&#171;.<\/p>\n<p>\u041d\u043e \u0432\u0435\u0440\u043d\u0451\u043c\u0441\u044f \u0436\u0435 \u043a \u043d\u0430\u0448\u0438\u043c \u0441\u043b\u043e\u043d\u0430\u043c. \u041c\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043b\u0438 \u043f\u0440\u043e\u0435\u043a\u0442 \u043d\u0430 \u043a\u043e\u043c\u043c\u0438\u0442\u0435 <a href=\"https:\/\/github.com\/php\/php-src\/commit\/c998c36b97d13cf936a9f5c4180d1104a6db6b80\" rel=\"noopener noreferrer nofollow\"><code>c998c36<\/code><\/a> \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430 <a href=\"https:\/\/pvs-studio.ru\/ru\/\" rel=\"noopener noreferrer nofollow\">PVS-Studio<\/a> \u0438 \u043f\u043b\u0430\u0433\u0438\u043d\u0430 \u0434\u043b\u044f <a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/manual\/6646\/\" rel=\"noopener noreferrer nofollow\">Visual Studio Code<\/a>.<\/p>\n<h3>\u0414\u044e\u0436\u0438\u043d\u0430 \u0431\u0430\u0433\u043e\u0432, \u043c\u0435\u0448\u0430\u044e\u0449\u0430\u044f \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u043c\u044b\u0441\u043b\u0438\u0442\u044c<\/h3>\n<p><strong>\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 N1<\/strong><\/p>\n<pre><code class=\"cpp\">int fcgi_listen(const char *path, int backlog) {   char *s;   int   tcp = 0;   ....   if (!tcp) {     chmod(path, 0777);   }   .... } <\/code><\/pre>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v1118\/\" rel=\"noopener noreferrer nofollow\">V1118<\/a> Excessive file permissions can lead to vulnerabilities. Consider restricting file permissions. <a href=\"https:\/\/github.com\/php\/php-src\/blob\/c998c36b97d13cf936a9f5c4180d1104a6db6b80\/main\/fastcgi.c#L761\" rel=\"noopener noreferrer nofollow\">fastcgi.c 761<\/a><\/p>\n<p>\u041d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u043a\u043e\u0434\u0430, \u0447\u0442\u043e \u0442\u0443\u0442 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0435 \u0442\u0430\u043a? \u0420\u0430\u0437\u0431\u0435\u0440\u0451\u043c\u0441\u044f. \u0424\u0443\u043d\u043a\u0446\u0438\u044f <code>chmod<\/code> \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043f\u0440\u0430\u0432\u0430 \u043d\u0430 \u0444\u0430\u0439\u043b \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c \u0441\u0438\u0441\u0442\u0435\u043c\u044b. \u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043c\u0430\u0441\u043a\u0430 <code>0777<\/code> \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043b\u044e\u0431\u043e\u043c\u0443 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u043e\u043c\u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u0447\u0438\u0442\u0430\u0442\u044c, \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c \u0438\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u044d\u0442\u043e\u0442 \u0444\u0430\u0439\u043b. \u0422\u0430\u043a\u0430\u044f \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u044c \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043a \u043f\u043b\u0430\u0447\u0435\u0432\u043d\u044b\u043c \u043f\u043e\u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u044f\u043c, \u043f\u043e\u0434\u0432\u0435\u0440\u0433\u043d\u0443\u0442\u044c\u0441\u044f \u0430\u0442\u0430\u043a\u0435 \u0437\u043b\u043e\u0443\u043c\u044b\u0448\u043b\u0435\u043d\u043d\u0438\u043a\u043e\u0432 \u0438 \u043d\u0430\u0440\u0443\u0448\u0438\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0443 \u0432\u0441\u0435\u0433\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e\u0433\u043e \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u044f. \u0427\u0442\u043e\u0431\u044b \u043d\u0435 \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0442\u0430\u043a\u043e\u0433\u043e, \u043b\u0443\u0447\u0448\u0435 \u0437\u0430\u0434\u0430\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u0449\u0430\u0434\u044f\u0449\u0438\u0439 \u0440\u0435\u0436\u0438\u043c \u0438 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u044f \u0434\u043b\u044f \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u0430\u0432.<\/p>\n<p>\u041a\u0441\u0442\u0430\u0442\u0438, \u044d\u0442\u0430 \u043f\u0435\u0440\u0432\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u044b \u043d\u0430\u0448\u043b\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u044d\u0442\u043e\u0433\u043e \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u0430. \u041e\u043d\u043e \u043f\u043e\u044f\u0432\u0438\u043b\u043e\u0441\u044c \u043d\u0435\u0434\u0430\u0432\u043d\u043e, \u043d\u043e \u0443\u0436\u0435 \u043f\u0440\u0438\u043d\u043e\u0441\u0438\u0442 \u0441\u0432\u043e\u0438 \u043f\u043b\u043e\u0434\u044b. \u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0439\u0442\u0435 <a href=\"https:\/\/pvs-studio.ru\/ru\/pvs-studio\/try-free\/?utm_source=website&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=1280\" rel=\"noopener noreferrer nofollow\">\u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e<\/a> PVS-Studio \u043d\u0430 \u0441\u0432\u043e\u0451\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044c\u0442\u0435 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c \u0432\u0430\u0448\u0435\u0433\u043e \u043a\u043e\u0434\u0430.<\/p>\n<p><strong>\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 N2<\/strong><\/p>\n<p>\u042d\u0442\u043e\u0442 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0431\u043e\u043b\u044c\u0448\u0435 \u0442\u044b\u0441\u044f\u0447\u0438 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 \u043d\u0430 \u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435. \u041d\u0430\u0439\u0442\u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0432 \u0442\u0430\u043a\u043e\u043c \u043a\u043e\u0434\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0438 \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u043b\u044f \u0441\u0442\u0430\u0442\u044c\u0438 \u043e\u043d \u0431\u044b\u043b \u043e\u0442\u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u043d. \u041a\u0441\u0442\u0430\u0442\u0438, \u043f\u043e\u043d\u044f\u0442\u044c, \u0432 \u0447\u0451\u043c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u043a\u043e\u0434\u0430-\u043a\u043e\u043b\u0431\u0430\u0441\u044b, \u043c\u043e\u0436\u043d\u043e \u0432 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 <a href=\"https:\/\/pvs-studio.ru\/ru\/blog\/posts\/cpp\/1230\/\" rel=\"noopener noreferrer nofollow\">\u0441\u0442\u0430\u0442\u044c\u0435<\/a>.<\/p>\n<pre><code class=\"cpp\">static inline zend_string* phar_get_stub(....) {   ....   static const char newstub1_1[] =    \"Extract_Phar::$temp))      {     \\nheader('HTTP\/1.0 404 Not Found');     \\necho      \\\"&lt;html&gt;       \\\\n &lt;head&gt;         \\\\n  &lt;title&gt;File Not Found&lt;title&gt;       \/\/ &lt;=       \\\\n &lt;\/head&gt;       \\\\n &lt;body&gt;         \\\\n  &lt;h1&gt;404 - File Not Found&lt;\/h1&gt;       \\\\n &lt;\/body&gt;     \\\\n&lt;\/html&gt;\\\";      \/\/ part of the string is hidden     \";   .... } <\/code><\/pre>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v735\/\" rel=\"noopener noreferrer nofollow\">V735<\/a> Possibly an incorrect HTML. The &#171;\\&lt;\/head\\&gt;&#187; closing tag was encountered, while the &#171;\\&lt;\/title\\&gt;&#187; tag was expected. <a href=\"https:\/\/github.com\/php\/php-src\/blob\/c998c36b97d13cf936a9f5c4180d1104a6db6b80\/ext\/phar\/stub.h#L23\" rel=\"noopener noreferrer nofollow\">stub.h 23<\/a><\/p>\n<p>&#171;\u0421\u043b\u043e\u043d\u0430-\u0442\u043e \u044f \u0438 \u043d\u0435 \u043f\u0440\u0438\u043c\u0435\u0442\u0438\u043b&#187;. \u0413\u0434\u0435, \u0435\u0441\u043b\u0438 \u043d\u0435 \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 PHP, \u043d\u0430\u0439\u0442\u0438 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 \u043d\u0430 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0437\u0430\u043a\u0440\u044b\u0442\u044b\u0439 \u0442\u0435\u0433. \u0422\u0430\u043a\u0430\u044f \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430, \u0430 \u0441\u043b\u043e\u043c\u0430\u043b\u0430 \u0432\u0441\u044e \u0432\u0451\u0440\u0441\u0442\u043a\u0443: \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u043d\u0435 \u0441\u043c\u043e\u0436\u0435\u0442 \u043e\u0442\u043e\u0431\u0440\u0430\u0437\u0438\u0442\u044c \u044d\u0442\u0443 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443. \u0414\u043b\u044f \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0438\u0439 \u0442\u0435\u0433 \u043d\u0430 \u0437\u0430\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0438\u0439:<\/p>\n<pre><code class=\"cpp\">\\\\n  &lt;title&gt;File Not Found&lt;\/title&gt; <\/code><\/pre>\n<p><strong>\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 N3<\/strong><\/p>\n<pre><code class=\"cpp\">static void zend_compile_class_decl(....) {   ....   if (....) {     if (toplevel) {       if (extends_ast) {         zend_class_entry *parent_ce = zend_lookup_class_ex(           ce-&gt;parent_name, NULL, ZEND_FETCH_CLASS_NO_AUTOLOAD);  \/\/ &lt;=         ....         }     }   }   ....   if (ce-&gt;parent_name) {                                         \/\/ &lt;=     \/* Lowercased parent name *\/     zend_string *lc_parent_name = zend_string_tolower(ce-&gt;parent_name);     opline-&gt;op2_type = IS_CONST;     LITERAL_STR(opline-&gt;op2, lc_parent_name);   } } <\/code><\/pre>\n<p>\u0417\u0434\u0435\u0441\u044c \u043c\u043e\u0436\u043d\u043e \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043f\u0430\u0442\u0442\u0435\u0440\u043d: \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c <code>ce-&gt;parent_name<\/code> \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u0442\u0441\u044f \u043a\u0430\u043a \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442 \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u044e <code>zend_lookup_class_ex<\/code>, \u0430 \u0437\u0430\u0442\u0435\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u043d\u0430 \u0432\u0430\u043b\u0438\u0434\u043d\u043e\u0441\u0442\u044c. \u0415\u0441\u043b\u0438 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u044e\u0442 \u043d\u0430 <code>NULL<\/code>, \u0437\u043d\u0430\u0447\u0438\u0442, \u043e\u043d \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0443\u043b\u0435\u0432\u044b\u043c, \u0430 \u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0441\u043b\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438.<\/p>\n<p>\u041d\u043e \u0432\u043e\u0442 \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u044e <code>zend_lookup_class_ex<\/code> \u0435\u0433\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u043b\u0438 \u0431\u0435\u0437 \u043a\u0430\u043a\u043e\u0439-\u043b\u0438\u0431\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438. \u0415\u0441\u043b\u0438 \u0432\u043d\u0443\u0442\u0440\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0435\u0441\u0442\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u0435, \u0442\u043e \u043d\u0438\u0447\u0435\u0433\u043e \u0441\u0442\u0440\u0430\u0448\u043d\u043e\u0433\u043e \u0432 \u044d\u0442\u043e\u043c \u043d\u0435\u0442. \u041d\u043e \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0437\u0430\u0433\u043b\u044f\u043d\u0435\u043c \u0432\u043d\u0443\u0442\u0440\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u0438. \u0410\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u0443\u0436\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043b \u0435\u0451 \u0438 \u0443\u043a\u0430\u0437\u0430\u043b \u043d\u0430 \u0441\u0442\u0440\u043e\u0447\u043a\u0443, \u0433\u0434\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0440\u0430\u0437\u044b\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435:<\/p>\n<pre><code class=\"cpp\">ZEND_API zend_class_entry *zend_lookup_class_ex(zend_string *name,                                                  zend_string *key,                                                  uint32_t flags) {   zend_class_entry *ce = NULL;   zval *zv;   zend_string *lc_name;   zend_string *autoload_name;   uint32_t ce_cache = 0;    if ((   zval_gc_flags((name)-&gt;gc.u.type_info) &amp; (1&lt;&lt;5))         \/\/ &lt;=        &amp;&amp; __builtin_expect(    !!((zend_gc_refcount(&amp;(name)-&gt;gc)-1)\/sizeof(void *)         &lt;(compiler_globals.map_ptr_last)), 1)) {     ce_cache = GC_REFCOUNT(name);     ce = GET_CE_CACHE(ce_cache);     if (EXPECTED(ce)) {       return ce;     }   }   .... } <\/code><\/pre>\n<p>\u0412\u043e\u0442 \u0438 \u0431\u0443\u043c! \u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <code>name<\/code>, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u043b\u0441\u044f \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c <code>ce-&gt;parent_name<\/code>, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0431\u0435\u0437 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438. \u0410 \u043a\u0430\u043a \u043c\u044b \u0437\u043d\u0430\u0435\u043c, \u043f\u0440\u0438 \u0440\u0430\u0437\u044b\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0438 \u043d\u0443\u043b\u0435\u0432\u043e\u0433\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043d\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043e. \u0418 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c <a href=\"https:\/\/pvs-studio.ru\/ru\/blog\/posts\/cpp\/1024\/\" rel=\"noopener noreferrer nofollow\">\u0432\u0441\u0451 \u0447\u0442\u043e \u0443\u0433\u043e\u0434\u043d\u043e<\/a>.<\/p>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v595\/\" rel=\"noopener noreferrer nofollow\">V595<\/a> The &#8216;ce-&gt;parent_name&#8217; pointer was utilized before it was verified against nullptr. Check lines: &#8216;zend_execute_API.c:1169&#8217;, &#8216;zend_compile.c:9135&#8217;, &#8216;zend_compile.c:9165&#8217;. <a href=\"https:\/\/github.com\/php\/php-src\/blob\/c998c36b97d13cf936a9f5c4180d1104a6db6b80\/Zend\/zend_compile.c#L9135\" rel=\"noopener noreferrer nofollow\">zend_compile.c 9135<\/a><\/p>\n<details class=\"spoiler\">\n<summary>\u041f\u043e\u0434\u043e\u0431\u043d\u044b\u0435 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u044f<\/summary>\n<div class=\"spoiler__content\">\n<ul>\n<li>\n<p>V595 The &#8216;ce-&gt;parent_name&#8217; pointer was utilized before it was verified against nullptr. Check lines: &#8216;zend_execute_API.c:1169&#8217;, &#8216;zend_compile.c:9135&#8217;, &#8216;zend_compile.c:9165&#8217;. zend_compile.c 9135<\/p>\n<\/li>\n<li>\n<p>V595 The &#8216;lcname&#8217; pointer was utilized before it was verified against nullptr. Check lines: &#8216;zend_API.c:2764&#8217;, &#8216;zend_compile.c:8374&#8217;, &#8216;zend_compile.c:8394&#8217;. zend_compile.c 8374<\/p>\n<\/li>\n<li>\n<p>V595 The &#8216;fcc-&gt;function_handler&#8217; pointer was utilized before it was verified against nullptr. Check lines: 4078, 4097. zend_API.c 4078<\/p>\n<\/li>\n<\/ul>\n<\/div>\n<\/details>\n<p><strong>\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 N4<\/strong><\/p>\n<pre><code class=\"cpp\">ZEND_API zend_result zend_register_functions(...)  {   while (ptr-&gt;fname) {       reg_function = malloc(sizeof(zend_internal_function));       memcpy(reg_function, &amp;function, sizeof(zend_internal_function));   } } <\/code><\/pre>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v575\/\" rel=\"noopener noreferrer nofollow\">V575<\/a> The potential null pointer is passed into &#8216;memcpy&#8217; function. Inspect the first argument. Check lines: 3069, 3068. <a href=\"https:\/\/github.com\/php\/php-src\/blob\/c998c36b97d13cf936a9f5c4180d1104a6db6b80\/Zend\/zend_API.c#L3069\" rel=\"noopener noreferrer nofollow\">zend_API.c 3069<\/a><\/p>\n<p>\u0410\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u0432\u044b\u0434\u0430\u0451\u0442 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435, \u0447\u0442\u043e \u043f\u0440\u0438 \u043f\u043e\u043f\u0430\u0434\u0430\u043d\u0438\u0438 \u043d\u0443\u043b\u0435\u0432\u043e\u0433\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u044e <code>memcpy<\/code> \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043d\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043e. &#171;\u0422\u0430\u043a, \u0430 \u0433\u0434\u0435 \u0436\u0435 \u0442\u0443\u0442 \u043d\u0443\u043b\u0435\u0432\u043e\u0439 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c? \u0421\u0442\u0440\u043e\u0447\u043a\u043e\u0439 \u0432\u044b\u0448\u0435 \u044f\u0432\u043d\u043e\u0435 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043f\u0430\u043c\u044f\u0442\u0438&#187;, \u2014 \u043c\u043e\u0436\u0435\u0442 \u0432\u043e\u0437\u043c\u0443\u0442\u0438\u0442\u044c\u0441\u044f \u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u044c. \u041d\u043e \u0441\u043f\u0435\u0448\u0443 \u0432\u0430\u0441 \u043e\u0433\u043e\u0440\u0447\u0438\u0442\u044c, \u0435\u0441\u043b\u0438 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0434\u0435\u043b\u0438\u0442\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0439 \u0443\u0447\u0430\u0441\u0442\u043e\u043a \u043f\u0430\u043c\u044f\u0442\u0438, \u0444\u0443\u043d\u043a\u0446\u0438\u044f <code>malloc<\/code> <a href=\"https:\/\/pvs-studio.ru\/ru\/blog\/posts\/cpp\/1107\/\" rel=\"noopener noreferrer nofollow\">\u043c\u043e\u0436\u0435\u0442 \u0432\u0435\u0440\u043d\u0443\u0442\u044c \u043d\u0443\u043b\u0435\u0432\u043e\u0439 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c<\/a>. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u043e\u0441\u043b\u0435 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043f\u0430\u043c\u044f\u0442\u0438 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u043d\u0430 <code>NULL<\/code>.<\/p>\n<details class=\"spoiler\">\n<summary>\u041f\u043e\u0434\u043e\u0431\u043d\u044b\u0435 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u044f<\/summary>\n<div class=\"spoiler__content\">\n<ul>\n<li>\n<p>V575 The potential null pointer is passed into &#8216;strncat&#8217; function. Inspect the first argument. Check lines: 1300, 1299. zend.c 1300<\/p>\n<\/li>\n<li>\n<p>V575 The potential null pointer is passed into &#8216;strncat&#8217; function. Inspect the second argument. Check lines: 1300, 1295. zend.c 1300<\/p>\n<\/li>\n<li>\n<p>V575 The &#8216;memmove&#8217; function processes &#8216;0&#8217; elements. Inspect the third argument. iconv.c 2435<\/p>\n<\/li>\n<li>\n<p>V575 The &#8216;memmove&#8217; function processes &#8216;0&#8217; elements. Inspect the third argument. filters.c 1411<\/p>\n<\/li>\n<\/ul>\n<\/div>\n<\/details>\n<p><strong>\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 N5<\/strong><\/p>\n<pre><code class=\"cpp\">ZEND_API void zend_collect_module_handlers(void) {   modules_dl_loaded = realloc(modules_dl_loaded,                                sizeof(zend_module_entry*)                                * (dl_loaded_count + 1));   modules_dl_loaded[dl_loaded_count] = NULL; } <\/code><\/pre>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v522\/\" rel=\"noopener noreferrer nofollow\">V522<\/a> There might be dereferencing of a potential null pointer &#8216;modules_dl_loaded&#8217;. Check lines: 2527, 2526. <a href=\"https:\/\/github.com\/php\/php-src\/blob\/c998c36b97d13cf936a9f5c4180d1104a6db6b80\/Zend\/zend_API.c#L2527\" rel=\"noopener noreferrer nofollow\">zend_API.c 2527<\/a><\/p>\n<p>\u0420\u0430\u0431\u043e\u0442\u0430 \u0441 \u043f\u0430\u043c\u044f\u0442\u044c\u044e \u2014 \u043d\u0435\u043e\u0442\u044a\u0435\u043c\u043b\u0435\u043c\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u044f\u0437\u044b\u043a\u043e\u0432 \u0421 \u0438 \u0421++, \u0438 \u0438\u043c\u0435\u043d\u043d\u043e \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0442\u0443\u0442 \u0442\u0430\u043a \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u044b\u0441\u0442\u0440\u0435\u043b\u0438\u0442\u044c \u0441\u0435\u0431\u0435 \u0432 \u043d\u043e\u0433\u0443. \u0424\u0443\u043d\u043a\u0446\u0438\u044f <code>realloc<\/code> \u0442\u0430\u043a \u0436\u0435, \u043a\u0430\u043a \u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044f <code>malloc<\/code>, \u043c\u043e\u0436\u0435\u0442 \u0432\u0435\u0440\u043d\u0443\u0442\u044c \u043d\u0443\u043b\u0435\u0432\u043e\u0439 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c.<\/p>\n<details class=\"spoiler\">\n<summary>\u041f\u043e\u0434\u043e\u0431\u043d\u044b\u0435 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u044f<\/summary>\n<div class=\"spoiler__content\">\n<ul>\n<li>\n<p>V522 There might be dereferencing of a potential null pointer &#8216;module_request_startup_handlers&#8217;. Check lines: 2520, 2514. zend_API.c 2520<\/p>\n<\/li>\n<li>\n<p>V522 There might be dereferencing of a potential null pointer &#8216;class_cleanup_handlers&#8217;. Check lines: 2557, 2553. zend_API.c 2557<\/p>\n<\/li>\n<li>\n<p>V522 There might be dereferencing of a potential null pointer &#8216;list&#8217;. Check lines: 3162, 3161. zend_API.c 3162<\/p>\n<\/li>\n<\/ul>\n<\/div>\n<\/details>\n<p><strong>\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 N6<\/strong><\/p>\n<pre><code class=\"cpp\">ZEND_API void zend_collect_module_handlers(void) {   modules_dl_loaded = realloc(modules_dl_loaded,                                sizeof(zend_module_entry*)                                * (dl_loaded_count + 1));   modules_dl_loaded[dl_loaded_count] = NULL; } <\/code><\/pre>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v701\/\" rel=\"noopener noreferrer nofollow\">V701<\/a> realloc() possible leak: when realloc() fails in allocating memory, original pointer &#8216;modules_dl_loaded&#8217; is lost. Consider assigning realloc() to a temporary pointer. <a href=\"https:\/\/github.com\/php\/php-src\/blob\/c998c36b97d13cf936a9f5c4180d1104a6db6b80\/Zend\/zend_API.c#L2526\" rel=\"noopener noreferrer nofollow\">zend_API.c 2526<\/a><\/p>\n<p>\u041d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u044b \u0431\u044b\u043b\u0438 \u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u044b? \u042d\u0442\u043e \u0442\u043e\u0442 \u0436\u0435 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u043a\u043e\u0434\u0430. \u0417\u0434\u0435\u0441\u044c \u0435\u0449\u0451 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u044e <code>realloc<\/code> \u043c\u044b \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u043c \u0442\u043e\u0442 \u0436\u0435 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442. \u0415\u0441\u043b\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0432\u0435\u0440\u043d\u0451\u0442 \u043d\u0443\u043b\u0435\u0432\u043e\u0439 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c, \u0442\u043e \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0442\u0435\u0440\u044f\u043d, \u0447\u0442\u043e \u043f\u0440\u0438\u0432\u0435\u0434\u0451\u0442 \u043a \u0443\u0442\u0435\u0447\u043a\u0435 \u043f\u0430\u043c\u044f\u0442\u0438.<\/p>\n<details class=\"spoiler\">\n<summary>\u041f\u043e\u0434\u043e\u0431\u043d\u044b\u0435 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u044f<\/summary>\n<div class=\"spoiler__content\">\n<ul>\n<li>\n<p>V701 realloc() possible leak: when realloc() fails in allocating memory, original pointer &#8216;zend_version_info&#8217; is lost. Consider assigning realloc() to a temporary pointer. zend.c 1299<\/p>\n<\/li>\n<li>\n<p>V701 realloc() possible leak: when realloc() fails in allocating memory, original pointer &#8216;module_request_startup_handlers&#8217; is lost. Consider assigning realloc() to a temporary pointer. zend_API.c 2514<\/p>\n<\/li>\n<li>\n<p>V701 realloc() possible leak: when realloc() fails in allocating memory, original pointer &#8216;modules_dl_loaded&#8217; is lost. Consider assigning realloc() to a temporary pointer. zend_API.c 2526<\/p>\n<\/li>\n<li>\n<p>V701 realloc() possible leak: when realloc() fails in allocating memory, original pointer &#8216;class_cleanup_handlers&#8217; is lost. Consider assigning realloc() to a temporary pointer. zend_API.c 2553<\/p>\n<\/li>\n<li>\n<p>V701 realloc() possible leak: when realloc() fails in allocating memory, original pointer &#8216;zend_flf_handlers&#8217; is lost. Consider assigning realloc() to a temporary pointer. zend_API.c 3086<\/p>\n<\/li>\n<li>\n<p>V701 realloc() possible leak: when realloc() fails in allocating memory, original pointer &#8216;zend_flf_functions&#8217; is lost. Consider assigning realloc() to a temporary pointer. zend_API.c 3087<\/p>\n<\/li>\n<li>\n<p>V701 realloc() possible leak: when realloc() fails in allocating memory, original pointer &#8216;p&#8217; is lost. Consider assigning realloc() to a temporary pointer. zend_alloc.c 3299<\/p>\n<\/li>\n<li>\n<p>V701 realloc() possible leak: when realloc() fails in allocating memory, original pointer &#8216;ce-&gt;interfaces&#8217; is lost. Consider assigning realloc() to a temporary pointer. zend_inheritance.c 1576<\/p>\n<\/li>\n<li>\n<p>V701 realloc() possible leak: when realloc() fails in allocating memory, original pointer &#8216;ce-&gt;interfaces&#8217; is lost. Consider assigning realloc() to a temporary pointer. zend_inheritance.c 2194<\/p>\n<\/li>\n<li>\n<p>V701 realloc() possible leak: when realloc() fails in allocating memory, original pointer &#8216;q-&gt;set&#8217; is lost. Consider assigning realloc() to a temporary pointer. ir_private.h 593<\/p>\n<\/li>\n<li>\n<p>V701 realloc() possible leak: when realloc() fails in allocating memory, original pointer &#8216;strtab-&gt;buf&#8217; is lost. Consider assigning realloc() to a temporary pointer. ir_strtab.c 81<\/p>\n<\/li>\n<li>\n<p>V701 realloc() possible leak: when realloc() fails in allocating memory, original pointer &#8216;blacklist-&gt;entries&#8217; is lost. Consider assigning realloc() to a temporary pointer. zend_accelerator_blacklist.c 236<\/p>\n<\/li>\n<li>\n<p>V701 realloc() possible leak: when realloc() fails in allocating memory, original pointer &#8216;* tmphstbuf&#8217; is lost. Consider assigning realloc() to a temporary pointer. network.c 1296<\/p>\n<\/li>\n<li>\n<p>V701 realloc() possible leak: when realloc() fails in allocating memory, original pointer &#8216;php_ini_scanned_files&#8217; is lost. Consider assigning realloc() to a temporary pointer. php_ini.c 702<\/p>\n<\/li>\n<li>\n<p>V701 realloc() possible leak: when realloc() fails in allocating memory, original pointer &#8216;b-&gt;value&#8217; is lost. Consider assigning realloc() to a temporary pointer. php_ini_builder.h 65<\/p>\n<\/li>\n<li>\n<p>V701 realloc() possible leak: when realloc() fails in allocating memory, original pointer &#8216;zend_extensions&#8217; is lost. Consider assigning realloc() to a temporary pointer. phpdbg.c 1216<\/p>\n<\/li>\n<li>\n<p>V701 realloc() possible leak: when realloc() fails in allocating memory, original pointer &#8216;state-&gt;code&#8217; is lost. Consider assigning realloc() to a temporary pointer. phpdbg_prompt.c 245<\/p>\n<\/li>\n<\/ul>\n<\/div>\n<\/details>\n<p><strong>\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 N7<\/strong><\/p>\n<pre><code class=\"cpp\">typedef union _znode_op {   uint32_t      num;   .... } struct _zend_op {   _znode_op op2;   .... }  struct _zend_op_array {   uint32_t num_dynamic_func_defs;   .... }  typedef struct _zend_op_array zend_op_array;  static void preload_remove_declares(zend_op_array *op_array) {   zend_op *opline = op_array-&gt;opcodes;   ....   while (opline != end) {     switch (opline-&gt;opcode) {       ....       case ZEND_DECLARE_FUNCTION:         ....         if (func &amp;&amp; func == op_array-&gt;dynamic_func_defs[opline-&gt;op2.num]) {           ....           if (op_array-&gt;num_dynamic_func_defs == 0) {             dynamic_func_defs = NULL;           } else {             ....             if (op_array-&gt;num_dynamic_func_defs - opline-&gt;op2.num &gt; 0) {  \/\/ &lt;=               memcpy(                 dynamic_func_defs + opline-&gt;op2.num,                 op_array-&gt;dynamic_func_defs + (opline-&gt;op2.num + 1),                 sizeof(zend_op_array*)                  * (op_array-&gt;num_dynamic_func_defs - opline-&gt;op2.num));             }   \/\/ the rest of the code } <\/code><\/pre>\n<p>\u041f\u0440\u0438\u0448\u043b\u043e \u0432\u0440\u0435\u043c\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u043b\u043e\u0433\u0438\u043a\u0443. \u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 <code>op_array-&gt;num_dynamic_func_defs<\/code> \u0438 <code>opline-&gt;op2.num<\/code> \u0438\u043c\u0435\u044e\u0442 \u0431\u0435\u0437\u0437\u043d\u0430\u043a\u043e\u0432\u044b\u0439 \u0442\u0438\u043f, \u0430 \u0437\u043d\u0430\u0447\u0438\u0442, \u0438 \u0441\u0430\u043c\u043e \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u0442\u0430\u043a\u0436\u0435 \u0438\u043c\u0435\u0442\u044c \u0431\u0435\u0437\u0437\u043d\u0430\u043a\u043e\u0432\u044b\u0439 \u0442\u0438\u043f \u0438 \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u0441\u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043c\u0435\u043d\u044c\u0448\u0435 \u043d\u0443\u043b\u044f.<\/p>\n<p>\u0427\u0442\u043e \u043c\u044b \u0432\u0438\u0434\u0438\u043c \u0442\u0443\u0442? \u0412\u044b\u0447\u0438\u0442\u0430\u043d\u0438\u0435 \u0434\u0432\u0443\u0445 \u0431\u0435\u0437\u0437\u043d\u0430\u043a\u043e\u0432\u044b\u0445 \u0447\u0438\u0441\u0435\u043b. \u0415\u0441\u043b\u0438 \u0443\u043c\u0435\u043d\u044c\u0448\u0430\u0435\u043c\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u0431\u0443\u0434\u0435\u0442 \u043c\u0435\u043d\u044c\u0448\u0435 \u0432\u044b\u0447\u0438\u0442\u0430\u0435\u043c\u043e\u0433\u043e, \u0442\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c \u0431\u0443\u0434\u0435\u0442 \u0447\u0438\u0441\u043b\u043e \u043c\u0435\u043d\u044c\u0448\u0435 \u043d\u0443\u043b\u044f. \u041d\u043e, \u0442\u0430\u043a \u043a\u0430\u043a \u0442\u0443\u0442 \u0431\u0435\u0437\u0437\u043d\u0430\u043a\u043e\u0432\u044b\u0435 \u0447\u0438\u0441\u043b\u0430, \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043e\u0431\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u0435 \u043f\u043e \u043c\u043e\u0434\u0443\u043b\u044e. \u0422\u043e \u0435\u0441\u0442\u044c <code>0u - 1 == UINT_MAX<\/code>. \u0418\u0437-\u0437\u0430 \u044d\u0442\u043e\u0433\u043e \u0443\u0441\u043b\u043e\u0432\u0438\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043b\u043e\u0436\u043d\u044b\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u043e\u0433\u0434\u0430, \u043a\u043e\u0433\u0434\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043d\u0435 \u0440\u0430\u0432\u043d\u044b \u0434\u0440\u0443\u0433 \u0434\u0440\u0443\u0433\u0443.<\/p>\n<p>\u042d\u0442\u043e \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:<\/p>\n<pre><code class=\"cpp\">if (op_array-&gt;num_dynamic_func_defs &gt; opline-&gt;op2.num) <\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043a\u043e\u0434 \u0441\u0442\u0430\u043b \u043a\u043e\u0440\u043e\u0447\u0435 \u0438 \u043f\u043e\u043d\u044f\u0442\u043d\u0435\u0435. \u0418\u043b\u0438, \u0432\u043f\u043e\u043b\u043d\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043b \u043e\u0448\u0438\u0431\u043a\u0443 \u0432 \u043b\u043e\u0433\u0438\u043a\u0435.<\/p>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v555\/\" rel=\"noopener noreferrer nofollow\">V555<\/a> The expression of the &#8216;A &#8212; B &gt; 0&#8217; kind will work as &#8216;A != B&#8217;. <a href=\"https:\/\/github.com\/php\/php-src\/blob\/c998c36b97d13cf936a9f5c4180d1104a6db6b80\/ext\/opcache\/ZendAccelerator.c#L3915\" rel=\"noopener noreferrer nofollow\">ZendAccelerator.c 3915<\/a><\/p>\n<p><strong>\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 N8<\/strong><\/p>\n<pre><code class=\"cpp\">uint64_t flags .... PHPDBG_API void phpdbg_delete_breakpoint(zend_ulong num) {   ....        if ((brake = phpdbg_find_breakbase_ex(num, &amp;table, &amp;numkey, &amp;strkey))) {       int type = brake-&gt;type;       char *name = NULL;       size_t name_len = 0L;        switch (type) {         ....         default: {           if (zend_hash_num_elements(table) == 1) {             PHPDBG_G(flags) &amp;= ~(1&lt;&lt;(brake-&gt;type+1));              \/\/ &lt;=           }         }       }     ....   } } <\/code><\/pre>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f PVS-Studio:<\/p>\n<p><a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v629\/\" rel=\"noopener noreferrer nofollow\">V629<\/a> Consider inspecting the &#8216;1 &lt;&lt; (brake-&gt;type + 1)&#8217; expression. Bit shifting of the 32-bit value with a subsequent expansion to the 64-bit type. <a href=\"https:\/\/github.com\/php\/php-src\/blob\/c998c36b97d13cf936a9f5c4180d1104a6db6b80\/sapi\/phpdbg\/phpdbg_bp.c#L1209\" rel=\"noopener noreferrer nofollow\">phpdbg_bp.c 1209<\/a><\/p>\n<p><a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v784\/\" rel=\"noopener noreferrer nofollow\">V784<\/a> The size of the bit mask is less than the size of the first operand. This will cause the loss of higher bits. <a href=\"https:\/\/github.com\/php\/php-src\/blob\/c998c36b97d13cf936a9f5c4180d1104a6db6b80\/sapi\/phpdbg\/phpdbg_bp.c#L1209\" rel=\"noopener noreferrer nofollow\">phpdbg_bp.c 1209<\/a><\/p>\n<p>\u041c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u043a\u0438, \u043d\u0435 \u0440\u0430\u0441\u0441\u043b\u0430\u0431\u043b\u044f\u0435\u043c\u0441\u044f. \u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f <code>flags<\/code> \u0438\u043c\u0435\u0435\u0442 \u0442\u0438\u043f <code>unsigned long int<\/code>, \u0432 \u0442\u043e \u0432\u0440\u0435\u043c\u044f \u043a\u0430\u043a <code>brake-&gt;type<\/code> \u0438\u043c\u0435\u0435\u0442 \u0442\u0438\u043f <code>int<\/code>. \u041a\u043e\u0434 \u043f\u0440\u0438\u0437\u0432\u0430\u043d \u0441\u043d\u044f\u0442\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0439 \u0431\u0438\u0442 \u0438\u0437 <code>flags<\/code>. \u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u0441\u043b\u0435\u0434\u0438\u043c \u0437\u0430 \u0440\u0443\u043a\u0430\u043c\u0438:<\/p>\n<ol>\n<li>\n<p>\u041a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0443 <code>1<\/code> \u0442\u0438\u043f\u0430 <code>int<\/code> \u0441\u0434\u0432\u0438\u0433\u0430\u044e\u0442 \u0432\u043b\u0435\u0432\u043e \u043d\u0430 \u043a\u0430\u043a\u043e\u0435-\u0442\u043e \u0447\u0438\u0441\u043b\u043e \u0431\u0438\u0442. \u0422\u0438\u043f <code>int<\/code> \u0447\u0430\u0449\u0435 \u0432\u0441\u0435\u0433\u043e 32-\u0431\u0438\u0442\u043d\u044b\u0439. \u041e\u0447\u0435\u043d\u044c \u043d\u0430\u0434\u0435\u0435\u043c\u0441\u044f, \u0447\u0442\u043e \u0441\u0434\u0432\u0438\u0433 \u043d\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043d\u0430 32 \u0438 \u0431\u043e\u043b\u0435\u0435 \u0431\u0438\u0442\u043e\u0432, \u0438\u043d\u0430\u0447\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 <a href=\"https:\/\/en.cppreference.com\/w\/c\/language\/operator_arithmetic.html#Shift_operators\" rel=\"noopener noreferrer nofollow\">\u043d\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043e<\/a>.<\/p>\n<\/li>\n<li>\n<p>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0441\u0434\u0432\u0438\u0433\u0430 \u043f\u043e\u0431\u0438\u0442\u043e\u0432\u043e \u0438\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u0443\u0435\u0442\u0441\u044f. \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0438\u043d\u0432\u0435\u0440\u0441\u0438\u0438 \u043f\u043e-\u043f\u0440\u0435\u0436\u043d\u0435\u043c\u0443 \u0438\u043c\u0435\u0435\u0442 \u0442\u0438\u043f <code>int<\/code>.<\/p>\n<\/li>\n<li>\n<p>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0438\u043d\u0432\u0435\u0440\u0441\u0438\u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0435\u0442\u0441\u044f \u0434\u043e 64-\u0431\u0438\u0442\u043d\u043e\u0433\u043e \u0431\u0435\u0437\u0437\u043d\u0430\u043a\u043e\u0432\u043e\u0433\u043e \u0442\u0438\u043f\u0430 \u0438\u0437-\u0437\u0430 \u043b\u0435\u0432\u043e\u0433\u043e \u043e\u043f\u0435\u0440\u0430\u043d\u0434\u0430. \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u0442\u0438\u043f \u0431\u044b\u043b \u0437\u043d\u0430\u043a\u043e\u0432\u044b\u043c, \u0442\u043e \u043f\u0440\u043e\u0438\u0437\u043e\u0439\u0434\u0451\u0442 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0441 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435\u043c \u0437\u043d\u0430\u043a\u0430. \u042d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u0434\u043b\u044f \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b \u0432 32 \u0441\u0442\u0430\u0440\u0448\u0438\u0445 \u0431\u0438\u0442\u0430 \u043f\u043e\u043f\u0430\u0434\u0443\u0442 \u043d\u0443\u043b\u0435\u0432\u044b\u0435 \u0431\u0438\u0442\u044b, \u0430 \u0434\u043b\u044f \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u2014 \u0435\u0434\u0438\u043d\u0438\u0447\u043d\u044b\u0435.<\/p>\n<\/li>\n<li>\n<p>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0430\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u0431\u0438\u0442\u043e\u0432\u044b\u043c &#171;\u0418&#187; \u043d\u0430 <code>flags<\/code>. \u041f\u043e\u0442\u0435\u0440\u044f \u0441\u0442\u0430\u0440\u0448\u0438\u0445 \u0437\u043d\u0430\u0447\u0438\u043c\u044b\u0445 \u0431\u0438\u0442\u043e\u0432 \u0432\u043e <code>flags<\/code> \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442\u044c, \u043a\u043e\u0433\u0434\u0430 \u043f\u0440\u0430\u0432\u044b\u0439 \u043e\u043f\u0435\u0440\u0430\u043d\u0434 \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439. \u0410 \u0438\u043c \u043e\u043d \u0431\u0443\u0434\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043a\u043e\u0433\u0434\u0430 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0441\u0434\u0432\u0438\u0433 \u043d\u0430 31 \u0431\u0438\u0442 \u0432\u043b\u0435\u0432\u043e, \u0442.\u0435. \u043a\u043e\u0433\u0434\u0430 \u043d\u0443\u0436\u043d\u043e \u0441\u0431\u0440\u043e\u0441\u0438\u0442\u044c 31-\u0439 \u0431\u0438\u0442 \u0432\u043e <code>flags<\/code>. <a href=\"https:\/\/godbolt.org\/z\/ejnze5xMh\" rel=\"noopener noreferrer nofollow\">\u041f\u0440\u0443\u0444<\/a>.<\/p>\n<\/li>\n<\/ol>\n<p>\u0417\u0430\u043c\u0435\u0442\u0438\u043b\u0438, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0441\u0435\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0432 \u0433\u043e\u043b\u043e\u0432\u0435 \u0434\u043b\u044f \u0442\u0430\u043a\u043e\u0433\u043e \u0431\u0435\u0437\u043e\u0431\u0438\u0434\u043d\u043e\u0433\u043e \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f? \u0410 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u043a\u0440\u043e\u0435\u0442\u0441\u044f \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u0440\u0430\u0437\u043c\u0435\u0440\u0430\u0445 \u043e\u043f\u0435\u0440\u0430\u043d\u0434\u043e\u0432 \u0438 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u043e\u0439 \u0437\u043d\u0430\u043a\u043e\u0432\u043e\u0441\u0442\u0438 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043f\u043e\u0434\u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0439. \u0410 \u043d\u0430\u0434\u043e \u0432\u0441\u0435\u0433\u043e \u043b\u0438\u0448\u044c \u043f\u043e\u043c\u0435\u043d\u044f\u0442\u044c \u0443 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b <code>1<\/code> \u0442\u0438\u043f \u0441 <code>int<\/code> \u0434\u043e <code>unsigned long long<\/code>, \u0438 \u0432\u0441\u0451 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c, \u043a\u0430\u043a \u0438 \u0437\u0430\u0434\u0443\u043c\u044b\u0432\u0430\u043b\u043e\u0441\u044c:<\/p>\n<pre><code class=\"cpp\">PHPDBG_G(flags) &amp;= ~( 1uLL &lt;&lt;(brake-&gt;type+1)); <\/code><\/pre>\n<p><strong>\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 N9<\/strong><\/p>\n<pre><code class=\"cpp\">typedef signed long long timelib_sll; .... timelib_sll timelib_get_current_offset(timelib_time *t); .... static void php_do_date_sunrise_sunset(INTERNAL_FUNCTION_PARAMETERS,                                         bool calc_sunset) {   double latitude, longitude, zenith, gmt_offset, altitude;   ....   if (gmt_offset_is_null) {       gmt_offset = timelib_get_current_offset(t) \/ 3600;  \/\/ &lt;=     }   .... } <\/code><\/pre>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v636\/\" rel=\"noopener noreferrer nofollow\">V636<\/a> The &#8216;timelib_get_current_offset(t) \/ 3600&#8217; expression was implicitly cast from &#8216;long long&#8217; type to &#8216;double&#8217; type. Consider utilizing an explicit type cast to avoid the loss of a fractional part. An example: double A = (double)(X) \/ Y;. <a href=\"https:\/\/github.com\/php\/php-src\/blob\/c998c36b97d13cf936a9f5c4180d1104a6db6b80\/ext\/date\/php_date.c#L5557\" rel=\"noopener noreferrer nofollow\">php_date.c 5557<\/a><\/p>\n<p>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0434\u0432\u0443\u0445 \u0446\u0435\u043b\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0445 \u0442\u0438\u043f\u043e\u0432 \u2014 \u0446\u0435\u043b\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0439 \u0442\u0438\u043f. \u0410 \u0434\u043b\u044f \u0447\u0435\u0433\u043e \u0436\u0435 \u0442\u043e\u0433\u0434\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u043b \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u0441 \u043f\u043b\u0430\u0432\u0430\u044e\u0449\u0435\u0439 \u0437\u0430\u043f\u044f\u0442\u043e\u0439?<\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u043d\u0435 \u0442\u0435\u0440\u044f\u0442\u044c \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u0434\u0438\u043d \u0438\u0437 \u043e\u043f\u0435\u0440\u0430\u043d\u0434\u043e\u0432 \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043a \u0442\u0438\u043f\u0443 <code>double<\/code>:<\/p>\n<pre><code class=\"cpp\">gmt_offset = timelib_get_current_offset(t) \/ 3600.0; <\/code><\/pre>\n<p><strong>\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 N10<\/strong><\/p>\n<pre><code class=\"cpp\">static zend_always_inline zend_result _zend_update_type_info(....) {   ....   if (ssa_op-&gt;result_def &gt;= 0) {     tmp =   MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY            | MAY_BE_ARRAY_OF_ANY | MAY_BE_ARRAY_OF_REF;     if (opline-&gt;result_type == IS_TMP_VAR) {       if (   opline-&gt;opcode == ZEND_FETCH_R            || opline-&gt;opcode == ZEND_FETCH_IS) {         \/* Variable reference counter may be decremented before use *\/         \/* See: ext\/opcache\/tests\/jit\/fetch_r_001.phpt *\/         tmp |= MAY_BE_RC1 | MAY_BE_RCN;       } else {         tmp |= MAY_BE_RC1 | MAY_BE_RCN;       }     }   }   .... } <\/code><\/pre>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v523\/\" rel=\"noopener noreferrer nofollow\">V523<\/a> The &#8216;then&#8217; statement is equivalent to the &#8216;else&#8217; statement. <a href=\"https:\/\/github.com\/php\/php-src\/blob\/c998c36b97d13cf936a9f5c4180d1104a6db6b80\/Zend\/Optimizer\/zend_inference.c#L4078\" rel=\"noopener noreferrer nofollow\">zend_inference.c 4078<\/a><\/p>\n<p>\u041f\u0435\u0440\u0435\u0434 \u043d\u0430\u043c\u0438 \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0441\u043b\u0443\u0447\u0430\u0439 <a href=\"https:\/\/pvs-studio.ru\/ru\/blog\/posts\/cpp\/a0068\/\" rel=\"noopener noreferrer nofollow\">\u043e\u0448\u0438\u0431\u043a\u0438 copy-paste<\/a>. \u041d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e \u043e\u0442 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442\u0441\u044f \u0443\u0441\u043b\u043e\u0432\u0438\u0435 <code>if<\/code>, \u043a\u043e\u0434 \u0434\u0435\u043b\u0430\u0435\u0442 \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e \u043e\u0434\u043d\u043e \u0438 \u0442\u043e \u0436\u0435: \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u0444\u043b\u0430\u0433\u0438 <code>MAY_BE_RC1 | MAY_BE_RCN<\/code> \u043a \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <code>tmp<\/code>.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0437\u0434\u0435\u0441\u044c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u0440\u0430\u0437\u043d\u0430\u044f \u043b\u043e\u0433\u0438\u043a\u0430 \u2014 \u0442\u0435\u043f\u0435\u0440\u044c \u0435\u0451 \u043d\u0435\u0442, \u0438 \u043a\u043e\u0434 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0435\u0432\u0435\u0440\u043d\u043e. \u0415\u0441\u043b\u0438 \u0440\u0430\u0437\u043d\u0438\u0446\u0430 \u043d\u0435 \u043d\u0443\u0436\u043d\u0430, \u0437\u0430\u0447\u0435\u043c \u0442\u043e\u0433\u0434\u0430 <code>if<\/code>?<\/p>\n<p><strong>\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 N11<\/strong><\/p>\n<pre><code class=\"cpp\">#define zend_error_noreturn_impl(type, format) do { \\     zend_string *filename; \\     uint32_t lineno; \\     va_list args; \\     get_filename_lineno(type, &amp;filename, &amp;lineno); \\     va_start(args, format); \\     zend_error_va_list(type, filename, lineno, format, args); \\     va_end(args); \\     \/* Should never reach this. *\/ \\     abort(); \\                                           \/\/ &lt;=   } while (0) .... ZEND_API ZEND_COLD ZEND_NORETURN    void zend_error_noreturn(int type, const char *format, ...) {   zend_error_noreturn_impl(type, format); } .... ZEND_API zend_result zend_startup_module_ex(zend_module_entry *module) {   ....    if (module-&gt;module_startup_func) {     EG(current_module) = module;     if (module-&gt;module_startup_func(module-&gt;type,                                      module-&gt;module_number)==FAILURE) {       zend_error_noreturn(E_CORE_ERROR,                           \"Unable to start %s module\",                            module-&gt;name);       EG(current_module) = NULL;                         \/\/ &lt;=       return FAILURE;     }     EG(current_module) = NULL;   }   return SUCCESS; } <\/code><\/pre>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v779\/\" rel=\"noopener noreferrer nofollow\">V779<\/a> Unreachable code detected. It is possible that an error is present. <a href=\"https:\/\/github.com\/php\/php-src\/blob\/c998c36b97d13cf936a9f5c4180d1104a6db6b80\/Zend\/zend_API.c#L2437\" rel=\"noopener noreferrer nofollow\">zend_API.c 2437<\/a><\/p>\n<p>\u041d\u0435\u0434\u043e\u0441\u0442\u0438\u0436\u0438\u043c\u044b\u0439 \u043a\u043e\u0434 \u043f\u043e\u0441\u043b\u0435 \u0432\u044b\u0437\u043e\u0432\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043d\u0435 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044e\u0449\u0435\u0439 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435. \u0422\u0430\u043a\u043e\u0439 \u043a\u043e\u0434 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0431\u0435\u0441\u043f\u043e\u043b\u0435\u0437\u0435\u043d, \u043d\u043e \u0438 \u0432\u0432\u043e\u0434\u0438\u0442 \u0432 \u0437\u0430\u0431\u043b\u0443\u0436\u0434\u0435\u043d\u0438\u0435.<\/p>\n<p>\u041d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u043e\u043a\u043e\u043f\u0430\u0432\u0448\u0438\u0441\u044c \u0432 \u043b\u043e\u0433\u0430\u0445, \u043c\u044b \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b\u0438 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0439 <a href=\"https:\/\/github.com\/php\/php-src\/commit\/acfc31c0f803601f49a4d512d73968f50924a68c\" rel=\"noopener noreferrer nofollow\">\u043a\u043e\u043c\u043c\u0438\u0442<\/a> 10-\u043b\u0435\u0442\u043d\u0435\u0439 \u0434\u0430\u0432\u043d\u043e\u0441\u0442\u0438. \u0420\u0430\u043d\u044c\u0448\u0435 \u043e\u0448\u0438\u0431\u043a\u0430 \u043f\u0440\u043e\u0441\u0442\u043e \u043b\u043e\u0433\u0438\u0440\u043e\u0432\u0430\u043b\u0430\u0441\u044c, \u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u043b\u043e\u0441\u044c, \u043d\u043e \u043f\u043e\u0442\u043e\u043c \u044d\u0442\u043e\u0442 \u043f\u0440\u0438\u043d\u0446\u0438\u043f \u043f\u043e\u043c\u0435\u043d\u044f\u043b\u0438 \u0434\u043b\u044f \u043a\u0440\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043e\u0448\u0438\u0431\u043e\u043a. \u0412 \u043a\u043e\u043c\u043c\u0438\u0442\u0435 \u0437\u0430\u043c\u0435\u043d\u0438\u043b\u0438 \u0432\u044b\u0437\u043e\u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <code>zend_error<\/code>, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044e\u0449\u0435\u0439 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435, \u043d\u0430 \u0432\u044b\u0437\u043e\u0432 <code>zend_error_noreturn<\/code>, \u043d\u043e \u043a\u043e\u0434 \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0440\u0435\u0444\u0430\u043a\u0442\u043e\u0440\u0438\u0442\u044c \u043d\u0435 \u0441\u0442\u0430\u043b\u0438.<\/p>\n<p><strong>\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 N12<\/strong><\/p>\n<pre><code class=\"cpp\">static void check_conflict(LexState*ls,struct LHS_assign*lh,expdesc*v){   FuncState*fs = ls-&gt;fs;   int extra = fs-&gt;freereg;   int conflict = 0;   for(; lh; lh = lh-&gt;prev){     if(lh-&gt;v.k == VINDEXED){       if(lh-&gt;v.u.s.info == v-&gt;u.s.info){ \/\/ &lt;=         conflict = 1;         lh-&gt;v.u.s.info = extra;       }       if(lh-&gt;v.u.s.aux == v-&gt;u.s.info){  \/\/ &lt;=         conflict = 1;         lh-&gt;v.u.s.aux = extra;       }     }   }   if(conflict){     luaK_codeABC(fs, OP_MOVE, fs-&gt;freereg, v-&gt;u.s.info, 0);     luaK_reserveregs(fs, 1);   } } <\/code><\/pre>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v778\/\" rel=\"noopener noreferrer nofollow\">V778<\/a> Two similar code fragments were found. Perhaps, this is a typo and &#8216;aux&#8217; variable should be used instead of &#8216;info&#8217;. <a href=\"https:\/\/github.com\/php\/php-src\/blob\/c998c36b97d13cf936a9f5c4180d1104a6db6b80\/ext\/opcache\/jit\/ir\/dynasm\/minilua.c#L4331\" rel=\"noopener noreferrer nofollow\">minilua.c 4331<\/a><\/p>\n<p>\u0414\u0432\u0430 \u0441\u0445\u043e\u0436\u0438\u0445 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u0430 \u043a\u043e\u0434\u0430. \u0410 \u0432\u0435\u0434\u044c \u0438 \u043f\u0440\u0430\u0432\u0434\u0430, \u0437\u0430\u0447\u0435\u043c \u043f\u0438\u0441\u0430\u0442\u044c \u043e\u0434\u043d\u043e \u0438 \u0442\u043e \u0436\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437, \u0435\u0441\u043b\u0438 \u043c\u043e\u0436\u043d\u043e \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438 \u043f\u043e\u043c\u0435\u043d\u044f\u0442\u044c \u0432 \u043d\u0443\u0436\u043d\u044b\u0445 \u043c\u0435\u0441\u0442\u0430\u0445? \u0427\u0442\u043e\u0431\u044b \u043d\u0435 \u0434\u043e\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0442\u0430\u043a\u0438\u0445 \u043e\u0448\u0438\u0431\u043e\u043a.<\/p>\n<p>\u0412 \u0443\u0441\u043b\u043e\u0432\u0438\u0438 \u043d\u0435 \u0432\u0441\u0435 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u044b <code>info<\/code> \u0437\u0430\u043c\u0435\u043d\u0438\u043b\u0438 \u043d\u0430 <code>aux<\/code>, \u0438\u0437-\u0437\u0430 \u0447\u0435\u0433\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u0430 \u043d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u0430\u044f \u0440\u0430\u0431\u043e\u0442\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b, \u0438 \u043e\u043d\u0430 \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0434\u0430\u0432\u0430\u0442\u044c \u043d\u0435\u0432\u0435\u0440\u043d\u044b\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b.<\/p>\n<h3>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h3>\n<p>\u0412\u043e\u0442 \u0442\u0430\u043a\u043e\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u043f\u0443\u0442\u0435\u0448\u0435\u0441\u0442\u0432\u0438\u0435 \u043f\u043e \u0434\u0438\u043a\u0438\u043c \u0434\u0436\u0443\u043d\u0433\u043b\u044f\u043c PHP-\u043a\u043e\u0434\u0430. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0432\u043c\u0435\u0441\u0442\u0435 \u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u043c\u0438\u0440 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u0435\u0435. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0443 PVS-Studio \u0435\u0441\u0442\u044c \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e\u0433\u043e \u043b\u0438\u0446\u0435\u043d\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u0430\u043a \u0434\u043b\u044f <a href=\"https:\/\/pvs-studio.ru\/ru\/order\/open-source-license\/\" rel=\"noopener noreferrer nofollow\">open source<\/a> \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432, \u0442\u0430\u043a \u0438 \u0434\u043b\u044f <a href=\"https:\/\/pvs-studio.ru\/ru\/order\/for-students\/\" rel=\"noopener noreferrer nofollow\">\u0441\u0442\u0443\u0434\u0435\u043d\u0442\u043e\u0432 \u0438 \u043f\u0440\u0435\u043f\u043e\u0434\u0430\u0432\u0430\u0442\u0435\u043b\u0435\u0439<\/a>. \u041e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u043c \u0436\u0435 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c <a href=\"https:\/\/pvs-studio.ru\/ru\/pvs-studio\/try-free\/?utm_source=website&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=1280\" rel=\"noopener noreferrer nofollow\">\u043f\u0440\u043e\u0431\u043d\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e<\/a> \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430 \u0438 \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0432 \u0434\u0435\u043b\u0435 \ud83d\ude42<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435\u0439 \u0441 \u0430\u043d\u0433\u043b\u043e\u044f\u0437\u044b\u0447\u043d\u043e\u0439 \u0430\u0443\u0434\u0438\u0442\u043e\u0440\u0438\u0435\u0439, \u0442\u043e \u043f\u0440\u043e\u0448\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 \u043f\u0435\u0440\u0435\u0432\u043e\u0434: Aleksandra Uvarova. <a href=\"https:\/\/pvs-studio.com\/en\/blog\/posts\/cpp\/1280\/\" rel=\"noopener noreferrer nofollow\">What if your elephant thinks it is bug?<\/a>.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/941970\/\"> https:\/\/habr.com\/ru\/articles\/941970\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041c\u044b \u043e\u043a\u0443\u043d\u0443\u043b\u0438\u0441\u044c \u0432 \u0432\u0435\u0431-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u0438 \u043d\u0430\u0448\u043b\u0438 \u0442\u0430\u043c \u043d\u0435\u043e\u0431\u044b\u0447\u043d\u043e\u0435 \u0436\u0438\u0432\u043e\u0442\u043d\u043e\u0435. \u042d\u0442\u043e \u0431\u044b\u043b \u0441\u043b\u043e\u043d \u0441 \u043f\u043e\u0432\u0430\u0434\u043a\u0430\u043c\u0438 \u0431\u0430\u0433\u0430. \u041c\u044b \u0438\u0437\u0443\u0447\u0438\u043b\u0438 \u043a\u043e\u0434 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 PHP \u0438 \u043f\u043e\u043d\u044f\u043b\u0438, \u0432 \u0447\u0451\u043c \u0434\u0435\u043b\u043e. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0432\u043c\u0435\u0441\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u043d\u0435\u043e\u0431\u044b\u0447\u043d\u044b\u0435 \u0441\u043b\u0443\u0447\u0430\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043a \u043d\u0435\u043e\u0436\u0438\u0434\u0430\u043d\u043d\u044b\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u043c.<\/p>\n<figure class=\"\"><\/figure>\n<h3>\u041e \u043f\u0440\u043e\u0435\u043a\u0442\u0435<\/h3>\n<p><a href=\"https:\/\/github.com\/php\/php-src\" rel=\"noopener noreferrer nofollow\">PHP<\/a> \u2014 \u043e\u0434\u0438\u043d \u0438\u0437 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u0441\u0446\u0435\u043d\u0430\u0440\u043d\u044b\u0445 \u044f\u0437\u044b\u043a\u043e\u0432 \u0432 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0432\u0435\u0431-\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u043e\u0439 \u0447\u0430\u0441\u0442\u0438. \u042f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c \u0441 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u043c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c, \u0438 \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u043e\u043f\u0430\u043b \u0432 \u043d\u0430\u0448\u0438 \u0440\u0443\u043a\u0438.<\/p>\n<p>\u041f\u0430\u0440\u0443 \u043b\u0435\u0442 \u043d\u0430\u0437\u0430\u0434 \u043c\u044b \u0443\u0436\u0435 <a href=\"https:\/\/pvs-studio.ru\/ru\/blog\/posts\/cpp\/0392\/\" rel=\"noopener noreferrer nofollow\">\u043f\u0440\u043e\u0432\u0435\u0440\u044f\u043b\u0438<\/a> \u044d\u0442\u043e\u0442 \u043f\u0440\u043e\u0435\u043a\u0442, \u043d\u043e \u0432\u0440\u0435\u043c\u044f \u043d\u0435 \u0441\u0442\u043e\u0438\u0442 \u043d\u0430 \u043c\u0435\u0441\u0442\u0435: \u043f\u0440\u043e\u0434\u0443\u043a\u0442 \u0440\u0430\u0437\u0432\u0438\u0432\u0430\u0435\u0442\u0441\u044f, \u043d\u0430\u0448\u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0441\u0442\u0430\u043d\u043e\u0432\u044f\u0442\u0441\u044f \u0443\u043c\u043d\u0435\u0435, \u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u043d\u0430\u0445\u043e\u0434\u044f\u0442 \u043d\u043e\u0432\u044b\u0435 \u0441\u043f\u043e\u0441\u043e\u0431\u044b \u0432\u044b\u0441\u0442\u0440\u0435\u043b\u0438\u0442\u044c \u0441\u0435\u0431\u0435 \u0432 \u043d\u043e\u0433\u0443.<\/p>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0433\u043e\u0432\u043e\u0440\u0438\u0442\u044c \u043f\u0440\u043e \u044f\u0437\u044b\u043a\u0438 C \u0438 C++, \u0433\u0434\u0435 \u043d\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043f\u043e\u0434\u0436\u0438\u0434\u0430\u0435\u0442 \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u043c \u0443\u0433\u043b\u0443. \u041d\u0435\u0434\u0430\u0432\u043d\u043e \u043c\u044b \u0434\u0430\u0436\u0435 \u0432\u044b\u043f\u0443\u0441\u0442\u0438\u043b\u0438 \u043e\u0431 \u044d\u0442\u043e\u043c \u0446\u0435\u043b\u0443\u044e \u043a\u043d\u0438\u0433\u0443 &#171;<a href=\"https:\/\/pvs-studio.ru\/ru\/blog\/posts\/cpp\/1215\/\" rel=\"noopener noreferrer nofollow\">\u041f\u0443\u0442\u0435\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c C++ \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u0430 \u043f\u043e \u043d\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u043c\u0443 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044e<\/a>&#171;.<\/p>\n<p>\u041d\u043e \u0432\u0435\u0440\u043d\u0451\u043c\u0441\u044f \u0436\u0435 \u043a \u043d\u0430\u0448\u0438\u043c \u0441\u043b\u043e\u043d\u0430\u043c. \u041c\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043b\u0438 \u043f\u0440\u043e\u0435\u043a\u0442 \u043d\u0430 \u043a\u043e\u043c\u043c\u0438\u0442\u0435 <a href=\"https:\/\/github.com\/php\/php-src\/commit\/c998c36b97d13cf936a9f5c4180d1104a6db6b80\" rel=\"noopener noreferrer nofollow\"><code>c998c36<\/code><\/a> \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430 <a href=\"https:\/\/pvs-studio.ru\/ru\/\" rel=\"noopener noreferrer nofollow\">PVS-Studio<\/a> \u0438 \u043f\u043b\u0430\u0433\u0438\u043d\u0430 \u0434\u043b\u044f <a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/manual\/6646\/\" rel=\"noopener noreferrer nofollow\">Visual Studio Code<\/a>.<\/p>\n<h3>\u0414\u044e\u0436\u0438\u043d\u0430 \u0431\u0430\u0433\u043e\u0432, \u043c\u0435\u0448\u0430\u044e\u0449\u0430\u044f \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u043c\u044b\u0441\u043b\u0438\u0442\u044c<\/h3>\n<p><strong>\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 N1<\/strong><\/p>\n<pre><code class=\"cpp\">int fcgi_listen(const char *path, int backlog) {   char *s;   int   tcp = 0;   ....   if (!tcp) {     chmod(path, 0777);   }   .... } <\/code><\/pre>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v1118\/\" rel=\"noopener noreferrer nofollow\">V1118<\/a> Excessive file permissions can lead to vulnerabilities. Consider restricting file permissions. <a href=\"https:\/\/github.com\/php\/php-src\/blob\/c998c36b97d13cf936a9f5c4180d1104a6db6b80\/main\/fastcgi.c#L761\" rel=\"noopener noreferrer nofollow\">fastcgi.c 761<\/a><\/p>\n<p>\u041d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u043a\u043e\u0434\u0430, \u0447\u0442\u043e \u0442\u0443\u0442 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0435 \u0442\u0430\u043a? \u0420\u0430\u0437\u0431\u0435\u0440\u0451\u043c\u0441\u044f. \u0424\u0443\u043d\u043a\u0446\u0438\u044f <code>chmod<\/code> \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043f\u0440\u0430\u0432\u0430 \u043d\u0430 \u0444\u0430\u0439\u043b \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c \u0441\u0438\u0441\u0442\u0435\u043c\u044b. \u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043c\u0430\u0441\u043a\u0430 <code>0777<\/code> \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043b\u044e\u0431\u043e\u043c\u0443 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u043e\u043c\u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u0447\u0438\u0442\u0430\u0442\u044c, \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c \u0438\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u044d\u0442\u043e\u0442 \u0444\u0430\u0439\u043b. \u0422\u0430\u043a\u0430\u044f \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u044c \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043a \u043f\u043b\u0430\u0447\u0435\u0432\u043d\u044b\u043c \u043f\u043e\u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u044f\u043c, \u043f\u043e\u0434\u0432\u0435\u0440\u0433\u043d\u0443\u0442\u044c\u0441\u044f \u0430\u0442\u0430\u043a\u0435 \u0437\u043b\u043e\u0443\u043c\u044b\u0448\u043b\u0435\u043d\u043d\u0438\u043a\u043e\u0432 \u0438 \u043d\u0430\u0440\u0443\u0448\u0438\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0443 \u0432\u0441\u0435\u0433\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e\u0433\u043e \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u044f. \u0427\u0442\u043e\u0431\u044b \u043d\u0435 \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0442\u0430\u043a\u043e\u0433\u043e, \u043b\u0443\u0447\u0448\u0435 \u0437\u0430\u0434\u0430\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u0449\u0430\u0434\u044f\u0449\u0438\u0439 \u0440\u0435\u0436\u0438\u043c \u0438 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u044f \u0434\u043b\u044f \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u0430\u0432.<\/p>\n<p>\u041a\u0441\u0442\u0430\u0442\u0438, \u044d\u0442\u0430 \u043f\u0435\u0440\u0432\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u044b \u043d\u0430\u0448\u043b\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u044d\u0442\u043e\u0433\u043e \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u0430. \u041e\u043d\u043e \u043f\u043e\u044f\u0432\u0438\u043b\u043e\u0441\u044c \u043d\u0435\u0434\u0430\u0432\u043d\u043e, \u043d\u043e \u0443\u0436\u0435 \u043f\u0440\u0438\u043d\u043e\u0441\u0438\u0442 \u0441\u0432\u043e\u0438 \u043f\u043b\u043e\u0434\u044b. \u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0439\u0442\u0435 <a href=\"https:\/\/pvs-studio.ru\/ru\/pvs-studio\/try-free\/?utm_source=website&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=1280\" rel=\"noopener noreferrer nofollow\">\u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e<\/a> PVS-Studio \u043d\u0430 \u0441\u0432\u043e\u0451\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044c\u0442\u0435 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c \u0432\u0430\u0448\u0435\u0433\u043e \u043a\u043e\u0434\u0430.<\/p>\n<p><strong>\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 N2<\/strong><\/p>\n<p>\u042d\u0442\u043e\u0442 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0431\u043e\u043b\u044c\u0448\u0435 \u0442\u044b\u0441\u044f\u0447\u0438 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 \u043d\u0430 \u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435. \u041d\u0430\u0439\u0442\u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0432 \u0442\u0430\u043a\u043e\u043c \u043a\u043e\u0434\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0438 \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u043b\u044f \u0441\u0442\u0430\u0442\u044c\u0438 \u043e\u043d \u0431\u044b\u043b \u043e\u0442\u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u043d. \u041a\u0441\u0442\u0430\u0442\u0438, \u043f\u043e\u043d\u044f\u0442\u044c, \u0432 \u0447\u0451\u043c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u043a\u043e\u0434\u0430-\u043a\u043e\u043b\u0431\u0430\u0441\u044b, \u043c\u043e\u0436\u043d\u043e \u0432 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 <a href=\"https:\/\/pvs-studio.ru\/ru\/blog\/posts\/cpp\/1230\/\" rel=\"noopener noreferrer nofollow\">\u0441\u0442\u0430\u0442\u044c\u0435<\/a>.<\/p>\n<pre><code class=\"cpp\">static inline zend_string* phar_get_stub(....) {   ....   static const char newstub1_1[] =    \"Extract_Phar::$temp))      {     \\nheader('HTTP\/1.0 404 Not Found');     \\necho      \\\"&lt;html&gt;       \\\\n &lt;head&gt;         \\\\n  &lt;title&gt;File Not Found&lt;title&gt;       \/\/ &lt;=       \\\\n &lt;\/head&gt;       \\\\n &lt;body&gt;         \\\\n  &lt;h1&gt;404 - File Not Found&lt;\/h1&gt;       \\\\n &lt;\/body&gt;     \\\\n&lt;\/html&gt;\\\";      \/\/ part of the string is hidden     \";   .... } <\/code><\/pre>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v735\/\" rel=\"noopener noreferrer nofollow\">V735<\/a> Possibly an incorrect HTML. The &#171;\\&lt;\/head\\&gt;&#187; closing tag was encountered, while the &#171;\\&lt;\/title\\&gt;&#187; tag was expected. <a href=\"https:\/\/github.com\/php\/php-src\/blob\/c998c36b97d13cf936a9f5c4180d1104a6db6b80\/ext\/phar\/stub.h#L23\" rel=\"noopener noreferrer nofollow\">stub.h 23<\/a><\/p>\n<p>&#171;\u0421\u043b\u043e\u043d\u0430-\u0442\u043e \u044f \u0438 \u043d\u0435 \u043f\u0440\u0438\u043c\u0435\u0442\u0438\u043b&#187;. \u0413\u0434\u0435, \u0435\u0441\u043b\u0438 \u043d\u0435 \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 PHP, \u043d\u0430\u0439\u0442\u0438 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 \u043d\u0430 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0437\u0430\u043a\u0440\u044b\u0442\u044b\u0439 \u0442\u0435\u0433. \u0422\u0430\u043a\u0430\u044f \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430, \u0430 \u0441\u043b\u043e\u043c\u0430\u043b\u0430 \u0432\u0441\u044e \u0432\u0451\u0440\u0441\u0442\u043a\u0443: \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u043d\u0435 \u0441\u043c\u043e\u0436\u0435\u0442 \u043e\u0442\u043e\u0431\u0440\u0430\u0437\u0438\u0442\u044c \u044d\u0442\u0443 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443. \u0414\u043b\u044f \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0438\u0439 \u0442\u0435\u0433 \u043d\u0430 \u0437\u0430\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0438\u0439:<\/p>\n<pre><code class=\"cpp\">\\\\n  &lt;title&gt;File Not Found&lt;\/title&gt; <\/code><\/pre>\n<p><strong>\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 N3<\/strong><\/p>\n<pre><code class=\"cpp\">static void zend_compile_class_decl(....) {   ....   if (....) {     if (toplevel) {       if (extends_ast) {         zend_class_entry *parent_ce = zend_lookup_class_ex(           ce-&gt;parent_name, NULL, ZEND_FETCH_CLASS_NO_AUTOLOAD);  \/\/ &lt;=         ....         }     }   }   ....   if (ce-&gt;parent_name) {                                         \/\/ &lt;=     \/* Lowercased parent name *\/     zend_string *lc_parent_name = zend_string_tolower(ce-&gt;parent_name);     opline-&gt;op2_type = IS_CONST;     LITERAL_STR(opline-&gt;op2, lc_parent_name);   } } <\/code><\/pre>\n<p>\u0417\u0434\u0435\u0441\u044c \u043c\u043e\u0436\u043d\u043e \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043f\u0430\u0442\u0442\u0435\u0440\u043d: \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c <code>ce-&gt;parent_name<\/code> \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u0442\u0441\u044f \u043a\u0430\u043a \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442 \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u044e <code>zend_lookup_class_ex<\/code>, \u0430 \u0437\u0430\u0442\u0435\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u043d\u0430 \u0432\u0430\u043b\u0438\u0434\u043d\u043e\u0441\u0442\u044c. \u0415\u0441\u043b\u0438 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u044e\u0442 \u043d\u0430 <code>NULL<\/code>, \u0437\u043d\u0430\u0447\u0438\u0442, \u043e\u043d \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0443\u043b\u0435\u0432\u044b\u043c, \u0430 \u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0441\u043b\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438.<\/p>\n<p>\u041d\u043e \u0432\u043e\u0442 \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u044e <code>zend_lookup_class_ex<\/code> \u0435\u0433\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u043b\u0438 \u0431\u0435\u0437 \u043a\u0430\u043a\u043e\u0439-\u043b\u0438\u0431\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438. \u0415\u0441\u043b\u0438 \u0432\u043d\u0443\u0442\u0440\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0435\u0441\u0442\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u0435, \u0442\u043e \u043d\u0438\u0447\u0435\u0433\u043e \u0441\u0442\u0440\u0430\u0448\u043d\u043e\u0433\u043e \u0432 \u044d\u0442\u043e\u043c \u043d\u0435\u0442. \u041d\u043e \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0437\u0430\u0433\u043b\u044f\u043d\u0435\u043c \u0432\u043d\u0443\u0442\u0440\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u0438. \u0410\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u0443\u0436\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043b \u0435\u0451 \u0438 \u0443\u043a\u0430\u0437\u0430\u043b \u043d\u0430 \u0441\u0442\u0440\u043e\u0447\u043a\u0443, \u0433\u0434\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0440\u0430\u0437\u044b\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435:<\/p>\n<pre><code class=\"cpp\">ZEND_API zend_class_entry *zend_lookup_class_ex(zend_string *name,                                                  zend_string *key,                                                  uint32_t flags) {   zend_class_entry *ce = NULL;   zval *zv;   zend_string *lc_name;   zend_string *autoload_name;   uint32_t ce_cache = 0;    if ((   zval_gc_flags((name)-&gt;gc.u.type_info) &amp; (1&lt;&lt;5))         \/\/ &lt;=        &amp;&amp; __builtin_expect(    !!((zend_gc_refcount(&amp;(name)-&gt;gc)-1)\/sizeof(void *)         &lt;(compiler_globals.map_ptr_last)), 1)) {     ce_cache = GC_REFCOUNT(name);     ce = GET_CE_CACHE(ce_cache);     if (EXPECTED(ce)) {       return ce;     }   }   .... } <\/code><\/pre>\n<p>\u0412\u043e\u0442 \u0438 \u0431\u0443\u043c! \u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <code>name<\/code>, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u043b\u0441\u044f \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c <code>ce-&gt;parent_name<\/code>, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0431\u0435\u0437 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438. \u0410 \u043a\u0430\u043a \u043c\u044b \u0437\u043d\u0430\u0435\u043c, \u043f\u0440\u0438 \u0440\u0430\u0437\u044b\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0438 \u043d\u0443\u043b\u0435\u0432\u043e\u0433\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043d\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043e. \u0418 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c <a href=\"https:\/\/pvs-studio.ru\/ru\/blog\/posts\/cpp\/1024\/\" rel=\"noopener noreferrer nofollow\">\u0432\u0441\u0451 \u0447\u0442\u043e \u0443\u0433\u043e\u0434\u043d\u043e<\/a>.<\/p>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v595\/\" rel=\"noopener noreferrer nofollow\">V595<\/a> The &#8216;ce-&gt;parent_name&#8217; pointer was utilized before it was verified against nullptr. Check lines: &#8216;zend_execute_API.c:1169&#8217;, &#8216;zend_compile.c:9135&#8217;, &#8216;zend_compile.c:9165&#8217;. <a href=\"https:\/\/github.com\/php\/php-src\/blob\/c998c36b97d13cf936a9f5c4180d1104a6db6b80\/Zend\/zend_compile.c#L9135\" rel=\"noopener noreferrer nofollow\">zend_compile.c 9135<\/a><\/p>\n<details class=\"spoiler\">\n<summary>\u041f\u043e\u0434\u043e\u0431\u043d\u044b\u0435 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u044f<\/summary>\n<div class=\"spoiler__content\">\n<ul>\n<li>\n<p>V595 The &#8216;ce-&gt;parent_name&#8217; pointer was utilized before it was verified against nullptr. Check lines: &#8216;zend_execute_API.c:1169&#8217;, &#8216;zend_compile.c:9135&#8217;, &#8216;zend_compile.c:9165&#8217;. zend_compile.c 9135<\/p>\n<\/li>\n<li>\n<p>V595 The &#8216;lcname&#8217; pointer was utilized before it was verified against nullptr. Check lines: &#8216;zend_API.c:2764&#8217;, &#8216;zend_compile.c:8374&#8217;, &#8216;zend_compile.c:8394&#8217;. zend_compile.c 8374<\/p>\n<\/li>\n<li>\n<p>V595 The &#8216;fcc-&gt;function_handler&#8217; pointer was utilized before it was verified against nullptr. Check lines: 4078, 4097. zend_API.c 4078<\/p>\n<\/li>\n<\/ul>\n<\/div>\n<\/details>\n<p><strong>\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 N4<\/strong><\/p>\n<pre><code class=\"cpp\">ZEND_API zend_result zend_register_functions(...)  {   while (ptr-&gt;fname) {       reg_function = malloc(sizeof(zend_internal_function));       memcpy(reg_function, &amp;function, sizeof(zend_internal_function));   } } <\/code><\/pre>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v575\/\" rel=\"noopener noreferrer nofollow\">V575<\/a> The potential null pointer is passed into &#8216;memcpy&#8217; function. Inspect the first argument. Check lines: 3069, 3068. <a href=\"https:\/\/github.com\/php\/php-src\/blob\/c998c36b97d13cf936a9f5c4180d1104a6db6b80\/Zend\/zend_API.c#L3069\" rel=\"noopener noreferrer nofollow\">zend_API.c 3069<\/a><\/p>\n<p>\u0410\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u0432\u044b\u0434\u0430\u0451\u0442 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435, \u0447\u0442\u043e \u043f\u0440\u0438 \u043f\u043e\u043f\u0430\u0434\u0430\u043d\u0438\u0438 \u043d\u0443\u043b\u0435\u0432\u043e\u0433\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u044e <code>memcpy<\/code> \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043d\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043e. &#171;\u0422\u0430\u043a, \u0430 \u0433\u0434\u0435 \u0436\u0435 \u0442\u0443\u0442 \u043d\u0443\u043b\u0435\u0432\u043e\u0439 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c? \u0421\u0442\u0440\u043e\u0447\u043a\u043e\u0439 \u0432\u044b\u0448\u0435 \u044f\u0432\u043d\u043e\u0435 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043f\u0430\u043c\u044f\u0442\u0438&#187;, \u2014 \u043c\u043e\u0436\u0435\u0442 \u0432\u043e\u0437\u043c\u0443\u0442\u0438\u0442\u044c\u0441\u044f \u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u044c. \u041d\u043e \u0441\u043f\u0435\u0448\u0443 \u0432\u0430\u0441 \u043e\u0433\u043e\u0440\u0447\u0438\u0442\u044c, \u0435\u0441\u043b\u0438 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0434\u0435\u043b\u0438\u0442\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0439 \u0443\u0447\u0430\u0441\u0442\u043e\u043a \u043f\u0430\u043c\u044f\u0442\u0438, \u0444\u0443\u043d\u043a\u0446\u0438\u044f <code>malloc<\/code> <a href=\"https:\/\/pvs-studio.ru\/ru\/blog\/posts\/cpp\/1107\/\" rel=\"noopener noreferrer nofollow\">\u043c\u043e\u0436\u0435\u0442 \u0432\u0435\u0440\u043d\u0443\u0442\u044c \u043d\u0443\u043b\u0435\u0432\u043e\u0439 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c<\/a>. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u043e\u0441\u043b\u0435 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043f\u0430\u043c\u044f\u0442\u0438 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u043d\u0430 <code>NULL<\/code>.<\/p>\n<details class=\"spoiler\">\n<summary>\u041f\u043e\u0434\u043e\u0431\u043d\u044b\u0435 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u044f<\/summary>\n<div class=\"spoiler__content\">\n<ul>\n<li>\n<p>V575 The potential null pointer is passed into &#8216;strncat&#8217; function. Inspect the first argument. Check lines: 1300, 1299. zend.c 1300<\/p>\n<\/li>\n<li>\n<p>V575 The potential null pointer is passed into &#8216;strncat&#8217; function. Inspect the second argument. Check lines: 1300, 1295. zend.c 1300<\/p>\n<\/li>\n<li>\n<p>V575 The &#8216;memmove&#8217; function processes &#8216;0&#8217; elements. Inspect the third argument. iconv.c 2435<\/p>\n<\/li>\n<li>\n<p>V575 The &#8216;memmove&#8217; function processes &#8216;0&#8217; elements. Inspect the third argument. filters.c 1411<\/p>\n<\/li>\n<\/ul>\n<\/div>\n<\/details>\n<p><strong>\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 N5<\/strong><\/p>\n<pre><code class=\"cpp\">ZEND_API void zend_collect_module_handlers(void) {   modules_dl_loaded = realloc(modules_dl_loaded,                                sizeof(zend_module_entry*)                                * (dl_loaded_count + 1));   modules_dl_loaded[dl_loaded_count] = NULL; } <\/code><\/pre>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v522\/\" rel=\"noopener noreferrer nofollow\">V522<\/a> There might be dereferencing of a potential null pointer &#8216;modules_dl_loaded&#8217;. Check lines: 2527, 2526. <a href=\"https:\/\/github.com\/php\/php-src\/blob\/c998c36b97d13cf936a9f5c4180d1104a6db6b80\/Zend\/zend_API.c#L2527\" rel=\"noopener noreferrer nofollow\">zend_API.c 2527<\/a><\/p>\n<p>\u0420\u0430\u0431\u043e\u0442\u0430 \u0441 \u043f\u0430\u043c\u044f\u0442\u044c\u044e \u2014 \u043d\u0435\u043e\u0442\u044a\u0435\u043c\u043b\u0435\u043c\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u044f\u0437\u044b\u043a\u043e\u0432 \u0421 \u0438 \u0421++, \u0438 \u0438\u043c\u0435\u043d\u043d\u043e \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0442\u0443\u0442 \u0442\u0430\u043a \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u044b\u0441\u0442\u0440\u0435\u043b\u0438\u0442\u044c \u0441\u0435\u0431\u0435 \u0432 \u043d\u043e\u0433\u0443. \u0424\u0443\u043d\u043a\u0446\u0438\u044f <code>realloc<\/code> \u0442\u0430\u043a \u0436\u0435, \u043a\u0430\u043a \u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044f <code>malloc<\/code>, \u043c\u043e\u0436\u0435\u0442 \u0432\u0435\u0440\u043d\u0443\u0442\u044c \u043d\u0443\u043b\u0435\u0432\u043e\u0439 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c.<\/p>\n<details class=\"spoiler\">\n<summary>\u041f\u043e\u0434\u043e\u0431\u043d\u044b\u0435 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u044f<\/summary>\n<div class=\"spoiler__content\">\n<ul>\n<li>\n<p>V522 There might be dereferencing of a potential null pointer &#8216;module_request_startup_handlers&#8217;. Check lines: 2520, 2514. zend_API.c 2520<\/p>\n<\/li>\n<li>\n<p>V522 There might be dereferencing of a potential null pointer &#8216;class_cleanup_handlers&#8217;. Check lines: 2557, 2553. zend_API.c 2557<\/p>\n<\/li>\n<li>\n<p>V522 There might be dereferencing of a potential null pointer &#8216;list&#8217;. Check lines: 3162, 3161. zend_API.c 3162<\/p>\n<\/li>\n<\/ul>\n<\/div>\n<\/details>\n<p><strong>\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 N6<\/strong><\/p>\n<pre><code class=\"cpp\">ZEND_API void zend_collect_module_handlers(void) {   modules_dl_loaded = realloc(modules_dl_loaded,                                sizeof(zend_module_entry*)                                * (dl_loaded_count + 1));   modules_dl_loaded[dl_loaded_count] = NULL; } <\/code><\/pre>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v701\/\" rel=\"noopener noreferrer nofollow\">V701<\/a> realloc() possible leak: when realloc() fails in allocating memory, original pointer &#8216;modules_dl_loaded&#8217; is lost. Consider assigning realloc() to a temporary pointer. <a href=\"https:\/\/github.com\/php\/php-src\/blob\/c998c36b97d13cf936a9f5c4180d1104a6db6b80\/Zend\/zend_API.c#L2526\" rel=\"noopener noreferrer nofollow\">zend_API.c 2526<\/a><\/p>\n<p>\u041d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u044b \u0431\u044b\u043b\u0438 \u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u044b? \u042d\u0442\u043e \u0442\u043e\u0442 \u0436\u0435 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u043a\u043e\u0434\u0430. \u0417\u0434\u0435\u0441\u044c \u0435\u0449\u0451 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u044e <code>realloc<\/code> \u043c\u044b \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u043c \u0442\u043e\u0442 \u0436\u0435 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442. \u0415\u0441\u043b\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0432\u0435\u0440\u043d\u0451\u0442 \u043d\u0443\u043b\u0435\u0432\u043e\u0439 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c, \u0442\u043e \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0442\u0435\u0440\u044f\u043d, \u0447\u0442\u043e \u043f\u0440\u0438\u0432\u0435\u0434\u0451\u0442 \u043a \u0443\u0442\u0435\u0447\u043a\u0435 \u043f\u0430\u043c\u044f\u0442\u0438.<\/p>\n<details class=\"spoiler\">\n<summary>\u041f\u043e\u0434\u043e\u0431\u043d\u044b\u0435 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u044f<\/summary>\n<div class=\"spoiler__content\">\n<ul>\n<li>\n<p>V701 realloc() possible leak: when realloc() fails in allocating memory, original pointer &#8216;zend_version_info&#8217; is lost. Consider assigning realloc() to a temporary pointer. zend.c 1299<\/p>\n<\/li>\n<li>\n<p>V701 realloc() possible leak: when realloc() fails in allocating memory, original pointer &#8216;module_request_startup_handlers&#8217; is lost. Consider assigning realloc() to a temporary pointer. zend_API.c 2514<\/p>\n<\/li>\n<li>\n<p>V701 realloc() possible leak: when realloc() fails in allocating memory, original pointer &#8216;modules_dl_loaded&#8217; is lost. Consider assigning realloc() to a temporary pointer. zend_API.c 2526<\/p>\n<\/li>\n<li>\n<p>V701 realloc() possible leak: when realloc() fails in allocating memory, original pointer &#8216;class_cleanup_handlers&#8217; is lost. Consider assigning realloc() to a temporary pointer. zend_API.c 2553<\/p>\n<\/li>\n<li>\n<p>V701 realloc() possible leak: when realloc() fails in allocating memory, original pointer &#8216;zend_flf_handlers&#8217; is lost. Consider assigning realloc() to a temporary pointer. zend_API.c 3086<\/p>\n<\/li>\n<li>\n<p>V701 realloc() possible leak: when realloc() fails in allocating memory, original pointer &#8216;zend_flf_functions&#8217; is lost. Consider<\/p>\n<\/li>\n<\/ul>\n<\/div>\n<\/details>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-472573","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/472573","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=472573"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/472573\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=472573"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=472573"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=472573"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}