-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Include correct header for malloc related functions. #658
Conversation
@@ -1,3 +1,4 @@ | |||
#include <stdlib.h> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this would not be necessary, if you add it once in src/sass_context_wrapper.h
.
Thanks for the contribution. 👍 I have left some comments, PTAL. |
Moved <stdlib.h> to common header and rebased. |
@am11 Including <stdio.h> is correct. Failing to include <stdlib.h> means Taking the responsible approach when using malloc/calloc/free is to include I am finding that master of node-sass generates a Segmentation Fault with my app.scss. I have run the tests and whilst there is a timeout failure with the huge test, there isn't a segfault, so my app.scss is triggering a regression (it works fine with 1.x). I haven't been able to determine where or what in the code is causing the problem yet but if I can isolate the cause I will open a separate issue. Here is the failing npm-debug.log:
|
Include correct header for malloc related functions.
@ahacking, thanks! 🎉 Regarding the issue, please open it in the issue tracker with steps to reproduce the error: Sass code, command you used to execute etc. |
@ahacking, note that it could be due to the unsupported language features in the |
Add support for the not expression
The C malloc() functions require inclusion of
stdlib.h
This fixes compilation on FreeBSD.