Req #78270 [NEW]: Usage of __vectorcall convention with FFI
| From: | lisachenko dot it at gmail dot com | Date: | Wed, 10 Jul 2019 13:37:41 +0000 |
| Subject: | Req #78270 [NEW]: Usage of __vectorcall convention with FFI | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-221683@lists.php.net to get a copy of this message | ||
From: lisachenko dot it at gmail dot com
Operating system: Windows x64
PHP version: 7.4.0alpha2
Package: Unknown/Other Function
Bug Type: Feature/Change Request
Bug description:Usage of __vectorcall convention with FFI
Description:
------------
I'm trying to import AST internal PHP functions with FFI, but for
Windows platform this brings a lot of pain, because __vectorcall
convention is used. It was introduced in
https://github.com/php/php-src/commit/3b6cd5fe4ce81d3d219887339f3915140214708c
Unfortunately, libffi doesn't support vectorcall convention, thus symbol
could not be imported properly with FFI.
Is it possible to remove such specific calling convention, used for
ZEND_FASTCALL macros for 7.4.0 and just switch to traditional one:
__fastcall for x32. For x64 platform
Expected result:
----------------
All exported PHP functions don't use vectorcall convention anymore.
Actual result:
--------------
Some PHP functions are exported as vectorcall-functions (have double @@
at the end with number of additional bytes), for example,
"zend_ast_evaluate@@24" and could not be imported with FFI under Windows
platform.
--
Edit bug report at https://bugs.php.net/bug.php?id=78270&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=78270&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=78270&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=78270&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=78270&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=78270&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=78270&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=78270&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=78270&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=78270&r=support
Expected behavior: https://bugs.php.net/fix.php?id=78270&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=78270&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=78270&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=78270&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=78270&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=78270&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=78270&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=78270&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=78270&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=78270&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=78270&r=mysqlcfg