php / php/php-src

unreachable program point: mime_content_type()

Open
#17,164 10 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Bug Category: Streams Extension: fileinfo Status: Needs Triage
Dominant language
C
Stars
40.4k
Forks
8.1k
Avg merge
2d 13h
Merged PRs (30d)
96

Description

Description

The following code:

<?php
var_dump(mime_content_type('./..'));
?>

Resulted in this output:

/home/dan/php-src/main/streams/plain_wrapper.c:290:4: runtime error: execution reached an unreachable program point
PHP Version

8.4.1

Operating System

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the PHP 8.4.1 example calling mime_content_type('./..') and inspect main/streams/plain_wrapper.c around line 290, where the unreachable program point is reported. Determine the expected handling for this input and verify that the runtime no longer reaches the reported failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, php
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.