Skip to content

Commit

Permalink
Fix GH-9967 Add support for generating custom function, class const, …
Browse files Browse the repository at this point in the history
…and property attributes in stubs
  • Loading branch information
kocsismate committed Jul 3, 2023
1 parent 297fec0 commit d7ab0ff
Show file tree
Hide file tree
Showing 14 changed files with 426 additions and 131 deletions.
48 changes: 24 additions & 24 deletions Zend/zend_attributes_arginfo.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Zend/zend_builtin_functions_arginfo.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions Zend/zend_exceptions_arginfo.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 comments on commit d7ab0ff

@iluuu1994
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason this was merged in PHP-8.2? I don't think we should merge big changes like this in stable branches.

@kocsismate
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The diff is mostly due to the a fix, as you weren't be able to use repeatable attributes. The rest of the changes didn't seem big to me, since they implement a missing feature. We can revert this from php-8.2 if you want.

@iluuu1994
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This feature also leaks.

Indirect leak of 40 byte(s) in 1 object(s) allocated from:
    #0 0x7f0e30ed92ff in malloc (/lib64/libasan.so.8+0xd92ff) (BuildId: dc689b05ca2577037af24700212bb5cce1f91c8a)
    #1 0x155e132 in __zend_malloc /home/ilutov/Developer/php-src/Zend/zend_alloc.c:3116
    #2 0x13c6c93 in zend_string_alloc /home/ilutov/Developer/php-src/Zend/zend_string.h:174
    #3 0x13c6ecb in zend_string_init /home/ilutov/Developer/php-src/Zend/zend_string.h:196
    #4 0x13cb462 in register_class_ZendAttributeTest /home/ilutov/Developer/php-src/ext/zend_test/test_arginfo.h:634
    #5 0x13e1da7 in zm_startup_zend_test /home/ilutov/Developer/php-src/ext/zend_test/test.c:986
    #6 0x1692e0d in zend_startup_module_ex /home/ilutov/Developer/php-src/Zend/zend_API.c:2311
    #7 0x1692f67 in zend_startup_module_zval /home/ilutov/Developer/php-src/Zend/zend_API.c:2326
    #8 0x16e4fa2 in zend_hash_apply /home/ilutov/Developer/php-src/Zend/zend_hash.c:2028
    #9 0x169510e in zend_startup_modules /home/ilutov/Developer/php-src/Zend/zend_API.c:2437
    #10 0x13fef72 in php_module_startup /home/ilutov/Developer/php-src/main/main.c:2200
    #11 0x1db9433 in php_cli_startup /home/ilutov/Developer/php-src/sapi/cli/php_cli.c:410
    #12 0x1dbe8a7 in main /home/ilutov/Developer/php-src/sapi/cli/php_cli.c:1298
    #13 0x7f0e30249b49 in __libc_start_call_main (/lib64/libc.so.6+0x27b49) (BuildId: 245240a31888ad5c11bbc55b18e02d87388f59a9)
    #14 0x7f0e30249c0a in __libc_start_main_alias_2 (/lib64/libc.so.6+0x27c0a) (BuildId: 245240a31888ad5c11bbc55b18e02d87388f59a9)
    #15 0x603d94 in _start (/home/ilutov/Developer/php-src/sapi/cli/php+0x603d94) (BuildId: f784ba9074ce9295978b873913fe2d8e163858df)

I'll look into it. If I can't solve it I will revert this for now.

@iluuu1994
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This also causes asan failures that I was unable to reproduce locally, and thus resolve...
https://cirrus-ci.com/task/5113184311312384

I will be reverting this for now.

Please sign in to comment.