Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UBSan alert at ext/standard/http_fopen_wrapper.c:236 #16809

Open
YuanchengJiang opened this issue Nov 15, 2024 · 1 comment · May be fixed by #16810
Open

UBSan alert at ext/standard/http_fopen_wrapper.c:236 #16809

YuanchengJiang opened this issue Nov 15, 2024 · 1 comment · May be fixed by #16810

Comments

@YuanchengJiang
Copy link

Description

The following code:

<?php
$config = [
'http' => [
'timeout' => PHP_INT_MAX,
],
];
$ctx = stream_context_create($config);
var_dump(fopen("http://www.example.com", "r", false, $ctx));

Resulted in this output:

/php-src/ext/standard/http_fopen_wrapper.c:236:20: runtime error: 9.22337e+18 is outside the range of representable values of type 'long'

PHP Version

nightly

Operating System

ubuntu 22.04

@devnexen
Copy link
Member

note that for this one I could reproduce it only with clang.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants