Skip to content

curl segfault #14102

Description

@ro0NL

Description

The following code:

$ cat composer.json 
{
    "require": {
        "symfony/http-client": "^6.4"
    }
}
<?php

require 'vendor/autoload.php';

use Symfony\Component\HttpClient\HttpClient;

$c = HttpClient::create();
$r = $c->request('GET', 'https://www.dubarry.com/eu/nl/search?sSearch=386922_40');

var_dump($r->getStatusCode());

Resulted in this output:

I have no name!@f6e21ecae0c6:/app$ php test.php 
int(200)
I have no name!@f6e21ecae0c6:/app$ php test.php 
Segmentation fault (core dumped)
I have no name!@f6e21ecae0c6:/app$ php test.php 
Segmentation fault (core dumped)
I have no name!@f6e21ecae0c6:/app$ php test.php 
Segmentation fault (core dumped)
I have no name!@f6e21ecae0c6:/app$ php test.php 
Segmentation fault (core dumped)
I have no name!@f6e21ecae0c6:/app$ php test.php 
Segmentation fault (core dumped)
I have no name!@f6e21ecae0c6:/app$ php test.php 
int(200)

But I expected this output instead:

only integers

The relevant symfony issue is at symfony/symfony#54796

Last trace is https://github.com/symfony/symfony/blob/c168c2c137acee438463fcde2df1685cf74ff623/src/Symfony/Component/HttpClient/Response/CurlResponse.php#L288

PHP Version

PHP 8.1.28

Operating System

Linux f6e21ecae0c6 6.5.0-28-generic #29~22.04.1-Ubuntu

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions