Bug #78416 [Opn->Fbk]: Invalid opcode from imagesetpixel

From: Date: Thu, 15 Aug 2019 08:13:40 +0000
Subject: Bug #78416 [Opn->Fbk]: Invalid opcode from imagesetpixel
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-222256@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=78416&edit=1 ID: 78416 Updated by: nikic@php.net Reported by: 115233618 at qq dot com Summary: Invalid opcode from imagesetpixel -Status: Open +Status: Feedback Type: Bug Package: GD related Operating System: CentOS 7.3 X64 PHP Version: 7.2.21 Block user comment: N Private report: N New Comment: Can you please provide a more complete reproduce script? Opcode 23 is ASSIGN_ADD, which is not produced by your code at all (it will likely involve "+="). Previous Comments: ------------------------------------------------------------------------ [2019-08-15 02:31:42] 115233618 at qq dot com Description: ------------ PHP Fatal error: Invalid opcode 23/16/8. in /wwwroot/web/protected/controller/VerifyController.php on line 41 VerifyController.php文件第41行代码: imagesetpixel($this->im,$this->width,$this->height,$this->point_color);//生成干扰像素 Test script: --------------- function set_point(){ if(empty($this->point_num)){ $this->point_num=100; } for($i=0;$i<$this->point_num;$i++){ $this->point_color=imagecolorallocate($this->im,mt_rand(0,255),mt_rand(0,255),mt_rand(0,255));//生成干扰像素颜色 imagesetpixel($this->im,$this->width,$this->height,$this->point_color);//生成干扰像素 } } Expected result: ---------------- 在png画布上生成干扰线,代码在php 7.2.18以下可以正常运行 Actual result: -------------- 环境升级到php7.2.21后该段代码运行报错: PHP Fatal error: Invalid opcode 23/16/8. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=78416&edit=1

« previous php.bugs (#222256) next »