Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Assertion `error && "Should have error if not callable"' failed.

オープン
#23,896 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
45/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
c, php
領域
backend

調査の方向性

Start with the supplied test.php snippet and CLI command, then inspect Zend/zend_execute_API.c around line 849 and the unserialize_callback_func path. Reproduce it with the provided debug and sanitizer configuration; done means this input no longer aborts on the assertion and the behavior is covered by a regression test.

索引モデルが issue の本文から書いたものです。

説明

Bug Status: Needs Triage
Description

The following code:

<?php
set_error_handler(function($severity, $m) { throw new Exception($m, $severity); });
class P {}
class C extends P {
public function u(string $s) { return unserialize($s); }
}
try { (new C)->u('O:3:"FOO":0:{}'); } catch (Throwable $e) {}

Resulted in this output:

php: /home/fuzz/WorkSpace/fusion-fuzz/projects/php/php-src/Zend/zend_execute_API.c:849: zend_result zend_call_function(zend_fcall_info *, zend_fcall_info_cache *): Assertion `error && "Should have error if not callable"' failed.
Aborted (core dumped)

To reproduce:

/home/fuzz/WorkSpace/fusion-fuzz/projects/php/php-src/sapi/cli/php  -d unserialize_callback_func=parent::my_unserialize ./test.php

Commit:

100e8f353ea8ef841339ba4c74a0966a7eea5157

Configurations:

CC="clang-12" CXX="clang++-12" CFLAGS="-DZEND_VERIFY_TYPE_INFERENCE" CXXFLAGS="-DZEND_VERIFY_TYPE_INFERENCE" ./configure --enable-debug --enable-address-sanitizer --enable-undefined-sanitizer --enable-re2c-cgoto --enable-fpm --enable-litespeed --enable-phpdbg-debug --enable-zts --enable-bcmath --enable-calendar --enable-dba --enable-dl-test --enable-exif --enable-ftp --enable-gd --enable-gd-jis-conv --enable-mbstring --enable-pcntl --enable-shmop --enable-soap --enable-sockets --enable-sysvmsg --enable-zend-test --with-zlib --with-bz2 --with-curl --with-enchant --with-gettext --with-gmp --with-mhash --with-ldap --with-libedit --with-readline --with-snmp --with-sodium --with-xsl --with-zip --with-mysqli --with-pdo-mysql --with-pdo-pgsql --with-pgsql --with-sqlite3 --with-pdo-sqlite --with-webp --with-jpeg --with-freetype --enable-sigchild --with-readline --with-pcre-jit --with-iconv

Operating System:

Ubuntu 20.04 Host, Docker 0599jiangyc/flowfusion:latest

This bug was found by fusion-fuzz

PHP Version
100e8f353ea8ef841339ba4c74a0966a7eea5157
Operating System

No response

主要言語
C
スター
40.4k
フォーク
8.2k
平均マージ
2日 10時間
マージ済み PR(30日)
118

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

php/php-src のほかの issue

php/php-src の issue をすべて見る

似ている issue

C の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。