-
Notifications
You must be signed in to change notification settings - Fork 157
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
sassc-2.1.0.pre2 invalid pointer exception #128
Comments
investigating... variables.scss
main.scss
if I inline variables.scss into main.scss, it works. So it looks like any use of @import triggers the error. |
@ahorek The pre-built binary is built in a Docker container, so everyone should have the same environment. To build it, simply clone the repo and run |
@ahorek You need to have Docker and VirtualBox installed for |
ok, I'll try that |
Compiled just now with the no-strip patch: sassc-2.1.0.pre2-x86_64-linux.gem.zip This was compiled on my Windows machine but that shouldn't matter. |
I was able to build #129 according to your manual, however the error remains the same
|
Perhaps you can try debugging with valgrind? valgrind --tool=memcheck ./your-command |
This looks suspicious: snipet==1985== Invalid free() / delete / delete[] / realloc() ==1985== at 0x4C29AB1: operator delete[](void*) (vg_replace_malloc.c:651) ==1985== by 0x1A6F5541: std::locale::_Impl::_M_install_facet(std::locale::id const*, std::locale::facet const*) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.20) ==1985== by 0x1A6F59A2: std::locale::_Impl::_Impl(unsigned long) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.20) ==1985== by 0x1A6F6914: ??? (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.20) ==1985== by 0x53D540F: pthread_once (pthread_once.S:103) ==1985== by 0x1A6F6960: ??? (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.20) ==1985== by 0x1A6F69A2: std::locale::locale() (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.20) ==1985== by 0x1A73D518: std::basic_filebuf >::basic_filebuf() (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.20) ==1985== by 0x197CE2F5: Sass::File::read_file(std::__cxx11::basic_string, std::allocator > const&) (in /usr/local/rvm/gems/ruby-head-opt/gems/sassc-2.1.0.pre2-x86_64-linux/lib/sassc/libsass.so) ==1985== by 0x1989DA5B: Sass::Context::load_import(Sass::Importer const&, Sass::ParserState) (in /usr/local/rvm/gems/ruby-head-opt/gems/sassc-2.1.0.pre2-x86_64-linux/lib/sassc/libsass.so) ==1985== by 0x1989E048: Sass::Context::import_url(Sass::Import*, std::__cxx11::basic_string, std::allocator >, std::__cxx11::basic_string, std::allocator > const&) (in /usr/local/rvm/gems/ruby-head-opt/gems/sassc-2.1.0.pre2-x86_64-linux/lib/sassc/libsass.so) ==1985== by 0x1989F769: Sass::Context::call_loader(std::__cxx11::basic_string, std::allocator > const&, char const*, Sass::ParserState&, Sass::Import*, std::vector >, bool) (in /usr/local/rvm/gems/ruby-head-opt/gems/sassc-2.1.0.pre2-x86_64-linux/lib/sassc/libsass.so) ==1985== Address 0x1a98ef00 is in the BSS segment of /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.20 I'll share a full log soon. |
I found a thread on gcchelp about this that seems somewhat related: |
From the gcchelp thread it looks like there is some kind of compatibility issue (bug) with GCC 4/5 and the locale header. Can you please try with this patch: It avoids initializing locales by using the C API to read files instead of the C++ one. |
thank you @glebm ! I can confirm the patch glebm/libsass@3b5190a fixes the problem. All tests passed. do we need a new libsass release? |
The only code change is my hotfix for sass#128 sass/libsass@0328de2 Fixes sass#128
Maybe not, sent #130 to build from the right commit. |
Includes hotfix for sass#128 sass/libsass@0328de2 Fixes sass#128
@ahorek |
Unfortunately, I'm getting the same issue with the pointer. |
I have an error during sass compilation
unfortunately no backtrace or hints where the problem could be.
it does happen only in combination with
pg gem 1.1.4 and sassc-2.1.0.pre2 (precompiled version)
if I build sassc-2.1.0.pre2 from source, it doesn't happen
sassc-2.1.0.pre2 (precompiled) + mysql gem also works fine
so weird...
tried multiple ruby versions without any difference
ruby 2.3.3p222 (2016-11-21 revision 56859) [x86_64-linux]
ruby 2.5.3p105 (2018-10-18 revision 65156) [x86_64-linux]
...
the error never occurred to me with prior sassc versions, so it's definitelly related.
Any idea how to debug it further? @glebm
I understand that the error message is quite useless, but I still wanted to report it before the final release.
thanks!
my env
The text was updated successfully, but these errors were encountered: