-
-
Notifications
You must be signed in to change notification settings - Fork 79
Closed
Labels
bugSomething isn't workingSomething isn't workingneeds investigationSomething is wrong, we are just not sure what/whySomething is wrong, we are just not sure what/why
Description
use ext_php_rs::prelude::*;
use ext_php_rs::types::Zval;
pub fn startup(_ty: i32, _: i32) -> i32 {
0
}
#[php_class]
#[derive(Default)]
struct Test {}
#[php_impl]
impl Test {
#[php(constructor)]
fn __constructor() -> Self {
Self {}
}
fn test(&self) {
let mut z = Zval::new();
let _ = z.set_string("TEST", true);
}
}
#[php_module]
fn module(module: ModuleBuilder) -> ModuleBuilder {
module.class::<Test>()
}<?php
$t = new Test;
var_dump($t->test());Output
zend_mm_heap corrupted
[2] 41472 IOT instruction (core dumped) php -d extension=./target/debug/libtest_php_ext.so ./index.phpOS: Archlinux
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingneeds investigationSomething is wrong, we are just not sure what/whySomething is wrong, we are just not sure what/why