-
Notifications
You must be signed in to change notification settings - Fork 340
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
Custom interfaces causing segmentation fault with PHP 7.3 #407
Comments
Same were, with the same code PHP 7.3.4 |
Confirming: OS: Ubuntu 19.04 (inside a virtualbox) Registering Interfaces and Classes works flawlessly, but as soon as a The SIGSEGV happens after the I included the backtrace of the crash:
|
Bug or not,How to do this problem. @scorninpc |
@lifenglsf, the first post show code to reproduce the problem |
I have the same problem, even if trying implement interface in PHP 7.3.6. extern "C" {
static Php::Extension extension("myextension", "0.1");
Php::Namespace AppUtilsNS("App\\Utils");
//IPrinter
Php::Interface iprinter("iPrinter");
iprinter.method("echoText", {
Php::ByVal("text", Php::Type::String, true),
Php::ByVal("toSpeach", Php::Type::Bool, false),
});
AppUtilsNS.add(iprinter);
extension.add(std::move(AppUtilsNS));
return extension;
} In php: use App\Utils\iPrinter;
class DummyPrinter implements iPrinter {
function echoText(string $text, bool $toSpeach = NULL) {
}
} Fatal error: Unable to instantiate in /home/.../tests/app/utils/DummyPrinter.phpt on line 11 |
Any updates on this issue? |
I would really appreciate if this issue would be fixed! |
Any thoughts about this issue? |
PHP version: 7.3.1
PHP-CPP version: 2.1.3
Compiler: g++ 8.2.0
OS: Debian 10
Custom interfaces are causing segmentation faults with PHP 7.3:
Code for reproducing:
The mentioned code works perfectly with PHP 7.1 & 7.2.
Thank you for your great effort creating and maintaining PHP-CPP!
The text was updated successfully, but these errors were encountered: