Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught FFI\Exception: Cannot instantiate FFI\CData of zero size #76

Open
NeroAdvents opened this issue Jul 28, 2020 · 1 comment
Open

Comments

@NeroAdvents
Copy link

NeroAdvents commented Jul 28, 2020

Hi,

Hi encountered some issues using the php compiler on a simple test file printing "Hello World":

➜  php-compiler git:(master) ✗ php bin/compile.php test.php
PHP Fatal error:  Uncaught FFI\Exception: Cannot instantiate FFI\CData of zero size in /home/nordine/PhpstormProjects/php-compiler/php-compiler/vendor/ircmaxell/php-llvm/ffi/llvm4.php:1602
Stack trace:
#0 /home/nordine/PhpstormProjects/php-compiler/php-compiler/vendor/ircmaxell/php-llvm/ffi/llvm4.php(1602): FFI->new()
#1 /home/nordine/PhpstormProjects/php-compiler/php-compiler/vendor/ircmaxell/php-llvm/lib/LLVMAbstract/Context.php(100): llvm\llvm->makeArray()
#2 /home/nordine/PhpstormProjects/php-compiler/php-compiler/lib/JIT/Context.php(149): PHPLLVM\LLVMAbstract\Context->functionType()
#3 /home/nordine/PhpstormProjects/php-compiler/php-compiler/lib/JIT/Context.php(101): PHPCompiler\JIT\Context->defineBuiltins()
#4 /home/nordine/PhpstormProjects/php-compiler/php-compiler/lib/Runtime.php(105): PHPCompiler\JIT\Context->__construct()
#5 /home/nordine/PhpstormProjects/php-compiler/php-compiler/lib/Runtime.php(153): PHPCompiler\Runtime->loadJitContext()
#6 /home/nordine/PhpstormProjects/php-compiler/php-compiler/bin/compile.php(30 in /home/nordine/PhpstormProjects/php-compiler/php-compiler/vendor/ircmaxell/php-llvm/ffi/llvm4.php on line 1602

And I wanted to know if your compiler was compatible with CakePHP ? I want to upgrade the performance and obfuscate my code by compiling the source code as shared objects (.so).

If anyone can help, would be appreciated.
Thanks.

@SalimF
Copy link

SalimF commented Nov 12, 2020

I got exact same issue , looks like nobody replies here .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants