I want to make a php extension on windows and also on linux, but i've got a function that give me core dump on linux, but on windows works.
PHP_FUNCTION(test_string)
{
char *arg = NULL;
int arg_len, len;
char string[256];
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &arg, &arg_len) == FAILURE) {
return;
}
len = sprintf(string, "String:%s", arg);
RETURN_STRINGL(arg, arg_len);
}
[Tue Aug 30 11:53:26.504574 2016] [core:notice] [pid 22804] AH00051: child pid 22807 exit signal Segmentation fault (11), possible coredump in /tmp/apache-coredumps