php (interpreter): SIGSEV on ZEND_MM_IS_FREE_BLOCK(next_block)
Hi!
I'm hacking the PHP interpreter. I want it to be able to get files that I have loaded into memory. I create the php_streams by hand for them inside PHPAPI php_stream *_php_stream_fopen_with_path (in plain_wrapper.c). The problem I'm facing is that I get a SIGSEV here: Code:
Program received signal SIGSEGV, Segmentation fault. Keep in mind I'm probably been not the most neat guy in order to create the php_stream I use to read the file from memory so perhaps I'm skipping a needed step in that regard. Thanks in advance. |
Following this guide from php [a]https://bugs.php.net/bugs-generating-backtrace.php[/a] I have found that in the last execute(), the value they print in debug is 0x0:
Code:
Program received signal SIGSEGV, Segmentation fault. |
What does mm_block represent?
Code:
(gdb) print size |
I'm wondering.... in order to create my dynamic structures I'm using malloc. Do I have to use a different function to allocate memory in php?
Thanks in advance. |
_malloc/_efree? Now I get a sigsegv but in a different spot:
Code:
(gdb) backtrace |
All times are GMT -5. The time now is 01:06 AM. |