Closed nicolasbadia closed 9 years ago
Hmm. I saw this on ubuntu utopic the other day. My C experience is not good enough to debug where its coming from. Anyone have any ideas?
looks like there's a free happening on not previously allocated memory. I'll have a look.
If I had to guess, I'd say the problem is with line 103 in our sass.c where we do
context->options.include_paths = this->include_paths != NULL ? this->include_paths : "";
and then later in sass_free_storage
if (obj->include_paths != NULL)
efree(obj->include_paths);
so if no include_path
is set in the PHP object, we're setting the sass
include path to a constant which we then proceed to call efree()
on.
I'll see whether sass_compile
is happy with a NULL include path now (it wasn't back when I initially made this mistake) and then we can get rid of the check in line 103
I investigagted further. The double free happens somewhere inside libsass itself, not related to our invocation. I suspect there's some issue with the old sass_interface.h
way of doing things. I'll port our code to the new non-deprecated way of doing it and try again.
Fixed by https://github.com/sensational/sassphp/pull/21. Thanks for taking care of this so quickly.
reopening because I should probably
the second one is important because two of the commits were security relevant.
Hi guys,
I'm having trouble to make sassphp work on Debian Jessie with latest PHP. Any idea where the problem could come from ? Here is the bug report I got: