Skip to content

FFI closures trigger ASan #18881

Closed
Closed
@NattyNarwhal

Description

@NattyNarwhal

Description

Updated the ppc64be CI system, it seems tests involving closures in FFI triggers ASan:

     Hello World!
002- {
003- 	Hello World!
004- }
005- Hello World!
002+ =================================================================
003+ ==2596234==ERROR: AddressSanitizer: unknown-crash on address 0x3fffa7971000 at pc 0x00013f76cd2c bp 0x3fffeac233e0 sp 0x3fffeac23458
004+ READ of size 65536 at 0x3fffa7971000 thread T0
005+     #0 0x13f76cd28 in write (/srv/actions/.cache/act/860b11f31bebdf6e/hostexecutor/sapi/cli/php+0x2d0cd28)
006+     #1 0x3fffa7925e9c  (/usr/lib64/libffi.so.8+0x15e9c)
007+     #2 0x3fffa7925f78  (/usr/lib64/libffi.so.8+0x15f78)
008+     #3 0x3fffa79235d0  (/usr/lib64/libffi.so.8+0x135d0)
009+     #4 0x3fffa7923e18 in ffi_closure_alloc (/usr/lib64/libffi.so.8+0x13e18)
010+     #5 0x140a62784 in zend_ffi_create_callback /srv/actions/.cache/act/860b11f31bebdf6e/hostexecutor/ext/ffi/ffi.c:1036:13
011+     #6 0x1408ee1c0 in zend_ffi_zval_to_cdata /srv/actions/.cache/act/860b11f31bebdf6e/hostexecutor/ext/ffi/ffi.c:844:22
012+     #7 0x140930bec in zend_ffi_write_var /srv/actions/.cache/act/860b11f31bebdf6e/hostexecutor/ext/ffi/ffi.c:2559:2
013+     #8 0x145693640 in ZEND_ASSIGN_OBJ_SPEC_CV_CONST_OP_DATA_TMP_HANDLER /srv/actions/.cache/act/860b11f31bebdf6e/hostexecutor/Zend/zend_vm_execute.h:43698:10
014+     #9 0x1454c5144 in execute_ex /srv/actions/.cache/act/860b11f31bebdf6e/hostexecutor/Zend/zend_vm_execute.h:58696:12
015+     #10 0x1454c7ec4 in zend_execute /srv/actions/.cache/act/860b11f31bebdf6e/hostexecutor/Zend/zend_vm_execute.h:64385:2
016+     #11 0x146539704 in zend_execute_script /srv/actions/.cache/act/860b11f31bebdf6e/hostexecutor/Zend/zend.c:1943:3
017+     #12 0x144722064 in php_execute_script_ex /srv/actions/.cache/act/860b11f31bebdf6e/hostexecutor/main/main.c:2594:13
018+     #13 0x14472348c in php_execute_script /srv/actions/.cache/act/860b11f31bebdf6e/hostexecutor/main/main.c:2634:9
019+     #14 0x146553854 in do_cli /srv/actions/.cache/act/860b11f31bebdf6e/hostexecutor/sapi/cli/php_cli.c:952:5
020+     #15 0x14654cb1c in main /srv/actions/.cache/act/860b11f31bebdf6e/hostexecutor/sapi/cli/php_cli.c:1363:18
021+     #16 0x3fffa6326b80  (/usr/lib64/libc.so.6+0x26b80)
022+     #17 0x3fffa6326de4 in __libc_start_main (/usr/lib64/libc.so.6+0x26de4)
023+ 
024+ Address 0x3fffa7971000 is a wild pointer inside of access range of size 0x000000010000.
025+ SUMMARY: AddressSanitizer: unknown-crash (/srv/actions/.cache/act/860b11f31bebdf6e/hostexecutor/sapi/cli/php+0x2d0cd28) in write
026+ Shadow bytes around the buggy address:
027+   0x3fffa7970d80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
028+   0x3fffa7970e00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
029+   0x3fffa7970e80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
030+   0x3fffa7970f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
031+   0x3fffa7970f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
032+ =>0x3fffa7971000:[fe]fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe
033+   0x3fffa7971080: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe
034+   0x3fffa7971100: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe
035+   0x3fffa7971180: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe
036+   0x3fffa7971200: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe
037+   0x3fffa7971280: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe
038+ Shadow byte legend (one shadow byte represents 8 application bytes):
039+   Addressable:           00
040+   Partially addressable: 01 02 03 04 05 06 07 
041+   Heap left redzone:       fa
042+   Freed heap region:       fd
043+   Stack left redzone:      f1
044+   Stack mid redzone:       f2
045+   Stack right redzone:     f3
046+   Stack after return:      f5
047+   Stack use after scope:   f8
048+   Global redzone:          f9
049+   Global init order:       f6
050+   Poisoned by user:        f7
051+   Container overflow:      fc
052+   Array cookie:            ac
053+   Intra object redzone:    bb
054+   ASan internal:           fe
055+   Left alloca redzone:     ca
056+   Right alloca redzone:    cb
057+ ==2596234==ABORTING
========DONE========
FAIL FFI 200: PHP callbacks [ext/ffi/tests/200.phpt] 

========DIFF========
--
     --- Struct ---
     bool(true)
     --- Callback return type ---
044- int(42)
045- --- Other FFI\CData assignment ---
046- int(123)
047- --- Array element ---
048- int(123)
044+ =================================================================
045+ ==2596480==ERROR: AddressSanitizer: unknown-crash on address 0x3fff9f901000 at pc 0x00013333cd2c bp 0x3ffff2c5bda0 sp 0x3ffff2c5be18
046+ READ of size 65536 at 0x3fff9f901000 thread T0
047+     #0 0x13333cd28 in write (/srv/actions/.cache/act/860b11f31bebdf6e/hostexecutor/sapi/cli/php+0x2d0cd28)
048+     #1 0x3fff9f8b5e9c  (/usr/lib64/libffi.so.8+0x15e9c)
049+     #2 0x3fff9f8b5f78  (/usr/lib64/libffi.so.8+0x15f78)
050+     #3 0x3fff9f8b35d0  (/usr/lib64/libffi.so.8+0x135d0)
051+     #4 0x3fff9f8b3e18 in ffi_closure_alloc (/usr/lib64/libffi.so.8+0x13e18)
052+     #5 0x134632784 in zend_ffi_create_callback /srv/actions/.cache/act/860b11f31bebdf6e/hostexecutor/ext/ffi/ffi.c:1036:13
053+     #6 0x1344be1c0 in zend_ffi_zval_to_cdata /srv/actions/.cache/act/860b11f31bebdf6e/hostexecutor/ext/ffi/ffi.c:844:22
054+     #7 0x13450b85c in zend_ffi_cdata_write_field /srv/actions/.cache/act/860b11f31bebdf6e/hostexecutor/ext/ffi/ffi.c:1380:3
055+     #8 0x139263640 in ZEND_ASSIGN_OBJ_SPEC_CV_CONST_OP_DATA_TMP_HANDLER /srv/actions/.cache/act/860b11f31bebdf6e/hostexecutor/Zend/zend_vm_execute.h:43698:10
056+     #9 0x139095144 in execute_ex /srv/actions/.cache/act/860b11f31bebdf6e/hostexecutor/Zend/zend_vm_execute.h:58696:12
057+     #10 0x139097ec4 in zend_execute /srv/actions/.cache/act/860b11f31bebdf6e/hostexecutor/Zend/zend_vm_execute.h:64385:2
058+     #11 0x13a109704 in zend_execute_script /srv/actions/.cache/act/860b11f31bebdf6e/hostexecutor/Zend/zend.c:1943:3
059+     #12 0x1382f2064 in php_execute_script_ex /srv/actions/.cache/act/860b11f31bebdf6e/hostexecutor/main/main.c:2594:13
060+     #13 0x1382f348c in php_execute_script /srv/actions/.cache/act/860b11f31bebdf6e/hostexecutor/main/main.c:2634:9
061+     #14 0x13a123854 in do_cli /srv/actions/.cache/act/860b11f31bebdf6e/hostexecutor/sapi/cli/php_cli.c:952:5
062+     #15 0x13a11cb1c in main /srv/actions/.cache/act/860b11f31bebdf6e/hostexecutor/sapi/cli/php_cli.c:1363:18
063+     #16 0x3fff9e2b6b80  (/usr/lib64/libc.so.6+0x26b80)
064+     #17 0x3fff9e2b6de4 in __libc_start_main (/usr/lib64/libc.so.6+0x26de4)
065+ 
066+ Address 0x3fff9f901000 is a wild pointer inside of access range of size 0x000000010000.
067+ SUMMARY: AddressSanitizer: unknown-crash (/srv/actions/.cache/act/860b11f31bebdf6e/hostexecutor/sapi/cli/php+0x2d0cd28) in write
068+ Shadow bytes around the buggy address:
069+   0x3fff9f900d80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
070+   0x3fff9f900e00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
071+   0x3fff9f900e80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
072+   0x3fff9f900f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
073+   0x3fff9f900f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
074+ =>0x3fff9f901000:[fe]fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe
075+   0x3fff9f901080: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe
076+   0x3fff9f901100: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe
077+   0x3fff9f901180: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe
078+   0x3fff9f901200: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe
079+   0x3fff9f901280: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe
080+ Shadow byte legend (one shadow byte represents 8 application bytes):
081+   Addressable:           00
082+   Partially addressable: 01 02 03 04 05 06 07 
083+   Heap left redzone:       fa
084+   Freed heap region:       fd
085+   Stack left redzone:      f1
086+   Stack mid redzone:       f2
087+   Stack right redzone:     f3
088+   Stack after return:      f5
089+   Stack use after scope:   f8
090+   Global redzone:          f9
091+   Global init order:       f6
092+   Poisoned by user:        f7
093+   Container overflow:      fc
094+   Array cookie:            ac
095+   Intra object redzone:    bb
096+   ASan internal:           fe
097+   Left alloca redzone:     ca
098+   Right alloca redzone:    cb
099+ ==2596480==ABORTING
========DONE========
FAIL Feature GH-11934 (Allow to pass CData into struct and/or union fields) [ext/ffi/tests/gh11934.phpt] 

========DIFF========
--
       int(123456789)
     }
     --- Callback values ---
012- int(-4)
013- int(4)
014- int(-10000)
015- int(10000)
016- int(-100000)
017- int(100000)
018- float(12.34000015258789)
019- object(FFI\CData:struct bug_gh16013_int_struct)#13 (1) {
020-   ["field"]=>
021-   int(10)
022- }
023- int(2)
012+ =================================================================
013+ ==2597452==ERROR: AddressSanitizer: unknown-crash on address 0x3fff88781000 at pc 0x00013df6cd2c bp 0x3ffff4bd6240 sp 0x3ffff4bd62b8
014+ READ of size 65536 at 0x3fff88781000 thread T0
015+     #0 0x13df6cd28 in write (/srv/actions/.cache/act/860b11f31bebdf6e/hostexecutor/sapi/cli/php+0x2d0cd28)
016+     #1 0x3fff88735e9c  (/usr/lib64/libffi.so.8+0x15e9c)
017+     #2 0x3fff88735f78  (/usr/lib64/libffi.so.8+0x15f78)
018+     #3 0x3fff887335d0  (/usr/lib64/libffi.so.8+0x135d0)
019+     #4 0x3fff88733e18 in ffi_closure_alloc (/usr/lib64/libffi.so.8+0x13e18)
020+     #5 0x13f262784 in zend_ffi_create_callback /srv/actions/.cache/act/860b11f31bebdf6e/hostexecutor/ext/ffi/ffi.c:1036:13
021+     #6 0x13f0ee1c0 in zend_ffi_zval_to_cdata /srv/actions/.cache/act/860b11f31bebdf6e/hostexecutor/ext/ffi/ffi.c:844:22
022+     #7 0x13f13b85c in zend_ffi_cdata_write_field /srv/actions/.cache/act/860b11f31bebdf6e/hostexecutor/ext/ffi/ffi.c:1380:3
023+     #8 0x143e93640 in ZEND_ASSIGN_OBJ_SPEC_CV_CONST_OP_DATA_TMP_HANDLER /srv/actions/.cache/act/860b11f31bebdf6e/hostexecutor/Zend/zend_vm_execute.h:43698:10
024+     #9 0x143cc5144 in execute_ex /srv/actions/.cache/act/860b11f31bebdf6e/hostexecutor/Zend/zend_vm_execute.h:58696:12
025+     #10 0x143cc7ec4 in zend_execute /srv/actions/.cache/act/860b11f31bebdf6e/hostexecutor/Zend/zend_vm_execute.h:64385:2
026+     #11 0x144d39704 in zend_execute_script /srv/actions/.cache/act/860b11f31bebdf6e/hostexecutor/Zend/zend.c:1943:3
027+     #12 0x142f22064 in php_execute_script_ex /srv/actions/.cache/act/860b11f31bebdf6e/hostexecutor/main/main.c:2594:13
028+     #13 0x142f2348c in php_execute_script /srv/actions/.cache/act/860b11f31bebdf6e/hostexecutor/main/main.c:2634:9
029+     #14 0x144d53854 in do_cli /srv/actions/.cache/act/860b11f31bebdf6e/hostexecutor/sapi/cli/php_cli.c:952:5
030+     #15 0x144d4cb1c in main /srv/actions/.cache/act/860b11f31bebdf6e/hostexecutor/sapi/cli/php_cli.c:1363:18
031+     #16 0x3fff87136b80  (/usr/lib64/libc.so.6+0x26b80)
032+     #17 0x3fff87136de4 in __libc_start_main (/usr/lib64/libc.so.6+0x26de4)
033+ 
034+ Address 0x3fff88781000 is a wild pointer inside of access range of size 0x000000010000.
035+ SUMMARY: AddressSanitizer: unknown-crash (/srv/actions/.cache/act/860b11f31bebdf6e/hostexecutor/sapi/cli/php+0x2d0cd28) in write
036+ Shadow bytes around the buggy address:
037+   0x3fff88780d80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
038+   0x3fff88780e00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
039+   0x3fff88780e80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
040+   0x3fff88780f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
041+   0x3fff88780f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
042+ =>0x3fff88781000:[fe]fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe
043+   0x3fff88781080: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe
044+   0x3fff88781100: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe
045+   0x3fff88781180: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe
046+   0x3fff88781200: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe
047+   0x3fff88781280: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe
048+ Shadow byte legend (one shadow byte represents 8 application bytes):
049+   Addressable:           00
050+   Partially addressable: 01 02 03 04 05 06 07 
051+   Heap left redzone:       fa
052+   Freed heap region:       fd
053+   Stack left redzone:      f1
054+   Stack mid redzone:       f2
055+   Stack right redzone:     f3
056+   Stack after return:      f5
057+   Stack use after scope:   f8
058+   Global redzone:          f9
059+   Global init order:       f6
060+   Poisoned by user:        f7
061+   Container overflow:      fc
062+   Array cookie:            ac
063+   Intra object redzone:    bb
064+   ASan internal:           fe
065+   Left alloca redzone:     ca
066+   Right alloca redzone:    cb
067+ ==2597452==ABORTING
========DONE========
FAIL GH-16013 (endianness issue with FFI) [ext/ffi/tests/gh16013.phpt] 

========DIFF========
001- object(FFI\CData:struct <anonymous>)#%d (1) {
002-   ["a"]=>
003-   int(2)
004- }
001+ =================================================================
002+ ==2597748==ERROR: AddressSanitizer: unknown-crash on address 0x3fffb7dc1000 at pc 0x00011175cd2c bp 0x3fffebd87520 sp 0x3fffebd87598
003+ READ of size 65536 at 0x3fffb7dc1000 thread T0
004+     #0 0x11175cd28 in write (/srv/actions/.cache/act/860b11f31bebdf6e/hostexecutor/sapi/cli/php+0x2d0cd28)
005+     #1 0x3fffb7d75e9c  (/usr/lib64/libffi.so.8+0x15e9c)
006+     #2 0x3fffb7d75f78  (/usr/lib64/libffi.so.8+0x15f78)
007+     #3 0x3fffb7d735d0  (/usr/lib64/libffi.so.8+0x135d0)
008+     #4 0x3fffb7d73e18 in ffi_closure_alloc (/usr/lib64/libffi.so.8+0x13e18)
009+     #5 0x112a52784 in zend_ffi_create_callback /srv/actions/.cache/act/860b11f31bebdf6e/hostexecutor/ext/ffi/ffi.c:1036:13
010+     #6 0x1128de1c0 in zend_ffi_zval_to_cdata /srv/actions/.cache/act/860b11f31bebdf6e/hostexecutor/ext/ffi/ffi.c:844:22
011+     #7 0x11292f1a4 in zend_ffi_cdata_write_dim /srv/actions/.cache/act/860b11f31bebdf6e/hostexecutor/ext/ffi/ffi.c:1494:2
012+     #8 0x117c80000 in zend_assign_to_object_dim /srv/actions/.cache/act/860b11f31bebdf6e/hostexecutor/Zend/zend_execute.c:1561:2
013+     #9 0x117595ef4 in ZEND_ASSIGN_DIM_SPEC_VAR_CONST_OP_DATA_TMP_HANDLER /srv/actions/.cache/act/860b11f31bebdf6e/hostexecutor/Zend/zend_vm_execute.h:24980:4
014+     #10 0x1174b5144 in execute_ex /srv/actions/.cache/act/860b11f31bebdf6e/hostexecutor/Zend/zend_vm_execute.h:58696:12
015+     #11 0x1174b7ec4 in zend_execute /srv/actions/.cache/act/860b11f31bebdf6e/hostexecutor/Zend/zend_vm_execute.h:64385:2
016+     #12 0x118529704 in zend_execute_script /srv/actions/.cache/act/860b11f31bebdf6e/hostexecutor/Zend/zend.c:1943:3
017+     #13 0x116712064 in php_execute_script_ex /srv/actions/.cache/act/860b11f31bebdf6e/hostexecutor/main/main.c:2594:13
018+     #14 0x11671348c in php_execute_script /srv/actions/.cache/act/860b11f31bebdf6e/hostexecutor/main/main.c:2634:9
019+     #15 0x118543854 in do_cli /srv/actions/.cache/act/860b11f31bebdf6e/hostexecutor/sapi/cli/php_cli.c:952:5
020+     #16 0x11853cb1c in main /srv/actions/.cache/act/860b11f31bebdf6e/hostexecutor/sapi/cli/php_cli.c:1363:18
021+     #17 0x3fffb6776b80  (/usr/lib64/libc.so.6+0x26b80)
022+     #18 0x3fffb6776de4 in __libc_start_main (/usr/lib64/libc.so.6+0x26de4)
023+ 
024+ Address 0x3fffb7dc1000 is a wild pointer inside of access range of size 0x000000010000.
025+ SUMMARY: AddressSanitizer: unknown-crash (/srv/actions/.cache/act/860b11f31bebdf6e/hostexecutor/sapi/cli/php+0x2d0cd28) in write
026+ Shadow bytes around the buggy address:
027+   0x3fffb7dc0d80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
028+   0x3fffb7dc0e00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
029+   0x3fffb7dc0e80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
030+   0x3fffb7dc0f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
031+   0x3fffb7dc0f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
032+ =>0x3fffb7dc1000:[fe]fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe
033+   0x3fffb7dc1080: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe
034+   0x3fffb7dc1100: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe
035+   0x3fffb7dc1180: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe
036+   0x3fffb7dc1200: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe
037+   0x3fffb7dc1280: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe
038+ Shadow byte legend (one shadow byte represents 8 application bytes):
039+   Addressable:           00
040+   Partially addressable: 01 02 03 04 05 06 07 
041+   Heap left redzone:       fa
042+   Freed heap region:       fd
043+   Stack left redzone:      f1
044+   Stack mid redzone:       f2
045+   Stack right redzone:     f3
046+   Stack after return:      f5
047+   Stack use after scope:   f8
048+   Global redzone:          f9
049+   Global init order:       f6
050+   Poisoned by user:        f7
051+   Container overflow:      fc
052+   Array cookie:            ac
053+   Intra object redzone:    bb
054+   ASan internal:           fe
055+   Left alloca redzone:     ca
056+   Right alloca redzone:    cb
057+ ==2597748==ABORTING
========DONE========
FAIL GH-8433 (Assigning function pointers to structs in FFI leaks memory) [ext/ffi/tests/gh8433.phpt] 

========DIFF========
001- Warning: Uncaught RuntimeException: Not allowed in %s:%d
002- Stack trace:
003- #0 %s(%d): {closure:%s:%d}()
004- #1 %s(%d): FFI->bug79177()
005- #2 {main}
006-   thrown in %s on line %d
001+ =================================================================
002+ ==2598173==ERROR: AddressSanitizer: unknown-crash on address 0x3fff8b431000 at pc 0x00010a88cd2c bp 0x3fffdd756040 sp 0x3fffdd7560b8
003+ READ of size 65536 at 0x3fff8b431000 thread T0
004+     #0 0x10a88cd28 in write (/srv/actions/.cache/act/860b11f31bebdf6e/hostexecutor/sapi/cli/php+0x2d0cd28)
005+     #1 0x3fff8b3e5e9c  (/usr/lib64/libffi.so.8+0x15e9c)
006+     #2 0x3fff8b3e5f78  (/usr/lib64/libffi.so.8+0x15f78)
007+     #3 0x3fff8b3e35d0  (/usr/lib64/libffi.so.8+0x135d0)
008+     #4 0x3fff8b3e3e18 in ffi_closure_alloc (/usr/lib64/libffi.so.8+0x13e18)
009+     #5 0x10bb82784 in zend_ffi_create_callback /srv/actions/.cache/act/860b11f31bebdf6e/hostexecutor/ext/ffi/ffi.c:1036:13
010+     #6 0x10ba0e1c0 in zend_ffi_zval_to_cdata /srv/actions/.cache/act/860b11f31bebdf6e/hostexecutor/ext/ffi/ffi.c:844:22
011+     #7 0x10ba50bec in zend_ffi_write_var /srv/actions/.cache/act/860b11f31bebdf6e/hostexecutor/ext/ffi/ffi.c:2559:2
012+     #8 0x1107b3640 in ZEND_ASSIGN_OBJ_SPEC_CV_CONST_OP_DATA_TMP_HANDLER /srv/actions/.cache/act/860b11f31bebdf6e/hostexecutor/Zend/zend_vm_execute.h:43698:10
013+     #9 0x1105e5144 in execute_ex /srv/actions/.cache/act/860b11f31bebdf6e/hostexecutor/Zend/zend_vm_execute.h:58696:12
014+     #10 0x1105e7ec4 in zend_execute /srv/actions/.cache/act/860b11f31bebdf6e/hostexecutor/Zend/zend_vm_execute.h:64385:2
015+     #11 0x111659704 in zend_execute_script /srv/actions/.cache/act/860b11f31bebdf6e/hostexecutor/Zend/zend.c:1943:3
016+     #12 0x10f842064 in php_execute_script_ex /srv/actions/.cache/act/860b11f31bebdf6e/hostexecutor/main/main.c:2594:13
017+     #13 0x10f84348c in php_execute_script /srv/actions/.cache/act/860b11f31bebdf6e/hostexecutor/main/main.c:2634:9
018+     #14 0x111673854 in do_cli /srv/actions/.cache/act/860b11f31bebdf6e/hostexecutor/sapi/cli/php_cli.c:952:5
019+     #15 0x11166cb1c in main /srv/actions/.cache/act/860b11f31bebdf6e/hostexecutor/sapi/cli/php_cli.c:1363:18
020+     #16 0x3fff89de6b80  (/usr/lib64/libc.so.6+0x26b80)
021+     #17 0x3fff89de6de4 in __libc_start_main (/usr/lib64/libc.so.6+0x26de4)
     
008- Fatal error: Throwing from FFI callbacks is not allowed in %s on line %d
023+ Address 0x3fff8b431000 is a wild pointer inside of access range of size 0x000000010000.
024+ SUMMARY: AddressSanitizer: unknown-crash (/srv/actions/.cache/act/860b11f31bebdf6e/hostexecutor/sapi/cli/php+0x2d0cd28) in write
025+ Shadow bytes around the buggy address:
026+   0x3fff8b430d80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
027+   0x3fff8b430e00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
028+   0x3fff8b430e80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
029+   0x3fff8b430f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
030+   0x3fff8b430f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
031+ =>0x3fff8b431000:[fe]fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe
032+   0x3fff8b431080: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe
033+   0x3fff8b431100: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe
034+   0x3fff8b431180: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe
035+   0x3fff8b431200: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe
036+   0x3fff8b431280: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe
037+ Shadow byte legend (one shadow byte represents 8 application bytes):
038+   Addressable:           00
039+   Partially addressable: 01 02 03 04 05 06 07 
040+   Heap left redzone:       fa
041+   Freed heap region:       fd
042+   Stack left redzone:      f1
043+   Stack mid redzone:       f2
044+   Stack right redzone:     f3
045+   Stack after return:      f5
046+   Stack use after scope:   f8
047+   Global redzone:          f9
048+   Global init order:       f6
049+   Poisoned by user:        f7
050+   Container overflow:      fc
051+   Array cookie:            ac
052+   Intra object redzone:    bb
053+   ASan internal:           fe
054+   Left alloca redzone:     ca
055+   Right alloca redzone:    cb
056+ ==2598173==ABORTING
========DONE========
FAIL Bug #79177 (FFI doesn't handle well PHP exceptions within callback) [ext/ffi/tests/bug79177.phpt] 

PHP Version

PHP 8.5.0-dev (cli) (built: Jun 19 2025 10:02:07) (ZTS DEBUG)
Copyright (c) The PHP Group
Zend Engine v4.5.0-dev, Copyright (c) Zend Technologies

Operating System

Gentoo/ppc64

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