-
Notifications
You must be signed in to change notification settings - Fork 463
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
Invalid multiplication (px * px) crashes #789
Comments
Actually Ruby Sass doesn't allow this calculation either.
|
@hugogiraudel Thanks for the heads up. IMO this is still a valid report as it should not crash! Or could you not reproduce the crash @xzyfer ? |
@mgreter you're correct. Sorry I got a bit overzealous |
@mgreter I've had a look at this and after a clean recompile I can't reproduce the crash. It errors as expected with the following
|
I'm reproducing this on sha 420d7fb
|
Interesting, I cannot produce this on that commit. I'm on OSX 10.9.5 $ cpp --version
Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)
Target: x86_64-apple-darwin13.4.0
Thread model: posix $ sassc --version
sassc: 3.0.2-14-g65d2
libsass: 3.1.0-beta.2-2-g420d
sass2scss: 1.0.3 $ (cd sassc; git rev-parse HEAD)
65d2bdbb48987acb1e68dd926ed23d4f19ccc271
$ (cd libsass; git rev-parse HEAD)
420d7fb4e578857150e15d80c966e5cac779d932 |
I'm reproducing on OS X and linux:
|
@drewwells can you please run the commands in my previous message and update the output in your comment. |
I'm running the following Sass. What command did you want me to try?
|
|
Ahh, I'm not running Sassc I'm running my implementation of libsass.
|
Could you please produce a gdb backtrace. Instructions on how to do so are here https://unix.stackexchange.com/questions/132192/running-application-ends-with-segmentation-fault/132193#132193?newreg=429090a85808440692bd71de25468216 |
I'm working through setting up gdb debugging on OS X. I'm not having much luck getting it to work with cgo (golang linker) though. |
Aha, this is why I'm having so much trouble: golang/go#5221 On linux,
|
Thanks for that! It looks like Libsass is returning the correct error
Are you sure wellington is dealing with the Sass_Error objects correct? Do you still get segfaults with this code? @error("foo"); |
Yep, @error parsing works great:
Error: foo
stdin:6 On Tue Dec 30 2014 at 6:52:35 PM Michael Mifsud notifications@github.com
|
Actually I also still get this crash with |
Interesting. Cool sounds like @mgreter is on the case. I've gotten about as far as I can with it. Thanks for all your help @drewwells |
This was a problem/bug with the C API. Should be fixed by #791! |
Btw. the different behaviour could be a system specfic one, since it boils down to an unhandled C++ exception in C code. For me it was previously crashing with the message @xzyfer please review and merge at your discretion 🍷 |
working for me too, thanks @mgreter !
|
👍 |
👍 @xzyfer, got your message on #libsass, with node-sass I tested with this: require("node-sass").renderSync({data:"div {\
$a: 1px;\
$b: 2px;\
foo: $a * $b;\
}"}) And it returned the error: {
"status": 1,
"file": "stdin",
"line": 1,
"column": 27,
"message": "2px*px is not a valid CSS value"
} (no crash) This happened before applying 6729b1a (it is pointing to 420d7fb). |
This code produces a crash with current master:
The test suite does not include this case!
All other math operations work correctly!
The text was updated successfully, but these errors were encountered: