php / php/php-src

Iterating on ResourceBundle (using keys) causes segmentation fault

Ouverte
#17,317 0 commentaires 0 réactions 1 personne assignée Voir sur GitHub

@devnexen y travaille déjà.

Depuis le 1/1/2025.

  • #17318 par @devnexen — fermée sans fusion
  • #17323 par @ndossche — ouverte
Bug Extension: intl Status: Verified
Langage dominant
C
Étoiles
40.4k
Forks
8.2k
Merge moyen
2 j 15 h
PR mergées (30 j)
103

Description

Description

The following code:

<?php
foreach ((new ResourceBundle('', NULL))->get('calendar')->get('buddhist') as $key => $value)
    ;

Resulted in:

(segfault)

But I expected:

(no segfault)

On my Windows machine (ICU 75.1), but not only (apparently).

Details
php_intl!resourcebundle_iterator_key+39 [D:\a\php-ftw\php-ftw\php\vs16\x64\php-8.4.1\ext\intl\resourcebundle\resourcebundle_iterator.c @ 107 + e]     0000193`c365e280     0000193`c36900c0     0000000`00130000     0000000`00000000   D:\a\php-ftw\php-ftw\php\vs16\x64\php-8.4.1\ext\intl\resourcebundle\resourcebundle_iterator.c @ 107 + e 
php8!zend_fe_fetch_object_helper_SPEC+e6 [D:\a\php-ftw\php-ftw\php\vs16\x64\php-8.4.1\Zend\zend_vm_execute.h @ 2981]     0000000`00000000     0000000`00000001     0000000`00000000     0000193`c36142e0   D:\a\php-ftw\php-ftw\php\vs16\x64\php-8.4.1\Zend\zend_vm_execute.h @ 2981 
php8!ZEND_FE_FETCH_R_SPEC_VAR_HANDLER+25 [D:\a\php-ftw\php-ftw\php\vs16\x64\php-8.4.1\Zend\zend_vm_execute.h @ 23002 + 8]     0000193`c3614400     0000193`c36142e0     0000000`00000000     0000000`00130000   D:\a\php-ftw\php-ftw\php\vs16\x64\php-8.4.1\Zend\zend_vm_execute.h @ 23002 + 8 
php8!execute_ex+4f [D:\a\php-ftw\php-ftw\php\vs16\x64\php-8.4.1\Zend\zend_vm_execute.h @ 58584 + f]     0000000`00000000     0000000`00000000     000e820`678f0d01     0000193`c1770150   D:\a\php-ftw\php-ftw\php\vs16\x64\php-8.4.1\Zend\zend_vm_execute.h @ 58584 + f 
php8!zend_execute+140 [D:\a\php-ftw\php-ftw\php\vs16\x64\php-8.4.1\Zend\zend_vm_execute.h @ 64238]     6328a15`6eea3000     0000193`c3602400     0000193`c366a180     0000000`00000000   D:\a\php-ftw\php-ftw\php\vs16\x64\php-8.4.1\Zend\zend_vm_execute.h @ 64238 
php8!zend_execute_script+201 [D:\a\php-ftw\php-ftw\php\vs16\x64\php-8.4.1\Zend\zend.c @ 1935]     0000000`00000000     0000000`00000000     000008c`223fd0d0     0000193`c3602418   D:\a\php-ftw\php-ftw\php\vs16\x64\php-8.4.1\Zend\zend.c @ 1935 
php8!php_execute_script_ex+277 [D:\a\php-ftw\php-ftw\php\vs16\x64\php-8.4.1\main\main.c @ 2574 + 14]     0000000`00000002     0000000`00000000     0000000`00000002     0000000`00000005   D:\a\php-ftw\php-ftw\php\vs16\x64\php-8.4.1\main\main.c @ 2574 + 14 
php!do_cli+c28 [D:\a\php-ftw\php-ftw\php\vs16\x64\php-8.4.1\sapi\cli\php_cli.c @ 937]     0000000`00000005     0000000`00000004     0000000`00000005     0000193`c585cec0   D:\a\php-ftw\php-ftw\php\vs16\x64\php-8.4.1\sapi\cli\php_cli.c @ 937 
php!main+401 [D:\a\php-ftw\php-ftw\php\vs16\x64\php-8.4.1\sapi\cli\php_cli.c @ 1310 + 5]     0000000`00000000     0007ff7`ec55c529     0000193`c177dc80     0000000`00000000   D:\a\php-ftw\php-ftw\php\vs16\x64\php-8.4.1\sapi\cli\php_cli.c @ 1310 + 5 
php!__scrt_common_main_seh+10c [D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl @ 288 + 22]     0000000`00000000     0000000`00000000     0000000`00000000     0000000`00000000   D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl @ 288 + 22 
kernel32!BaseThreadInitThunk+1d     0000000`00000000     0000000`00000000     0000000`00000000     0000000`00000000    
ntdll!RtlUserThreadStart+28 
PHP Version

PHP 8.4.1

Operating System

No response

Guide de contribution

Ouvrir le guide de contribution

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.