Skip to content
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

[DNM] CI Test #1883

Closed
wants to merge 1 commit into from
Closed

[DNM] CI Test #1883

wants to merge 1 commit into from

Conversation

mgreter
Copy link
Contributor

@mgreter mgreter commented Jan 19, 2016

Spec sass/sass-spec#720

Listing issues that only pass on some CI configurations:

The last two seem related to #1786

@mgreter
Copy link
Contributor Author

mgreter commented Jan 19, 2016

Seems we do have an issue with Appveyor MSVC Debug build. We should check how we can make the process not block when debug assertions are thrown (on spec for 1793):

libsass-msvc-debug-assert

@mgreter mgreter force-pushed the test/travis-ci-specs branch from 0dbb709 to accaf76 Compare January 19, 2016 15:58
@am11
Copy link
Contributor

am11 commented Jan 19, 2016

On R6010:

If we want to handle this in libsass, we would probably need to prevent the default std::terminate followed by abort (for example when application tries to write to memory outside its address space) by exception handling.

If we want to handle this in sassc, the C way, we would probably need to do error handling for Signals; we will catch SIGABRT as described under Example section of this article. However, literature-wise this article precedes the previous one.

@mgreter
Copy link
Contributor Author

mgreter commented Jan 19, 2016

Sorry, forgot to mention I already merged sass/sassc@5cb56f3

@am11
Copy link
Contributor

am11 commented Jan 19, 2016

👍

@mgreter
Copy link
Contributor Author

mgreter commented Jan 19, 2016

Now hunting down the issue which seems some memory corruption. Quite a hunt I can say so far ...
Basically we seem to have a buffer overflow somewhere, which corrupts that memory ... 🐛 🚑

@mgreter
Copy link
Contributor Author

mgreter commented Jan 20, 2016

Issue is we pass a c_str() to Parser::from_c_str from a temporary when expanding Media Blocks.

@mgreter mgreter force-pushed the test/travis-ci-specs branch from accaf76 to 47797f8 Compare January 20, 2016 00:16
@mgreter
Copy link
Contributor Author

mgreter commented Jan 20, 2016

Added a fix to keep the memory alive until context is deleted. This exposes a funky issue with error reporting. We re-parse some things after ie. interpolation. An error there will not show the real source, but the interpolated thing we tried to re-parse (also note that the line number is off):

Error: 10in*px isn't a valid CSS value.
        on line 1 of spec/libsass-closed-issues/issue_1793/input.scss
>> (max-width: 10in*px)
   ------------^

Unsure how to handle this, best would be to be sure we don't error when we re-parse something (error on parse or after evaluation step, ie. with the above we could allow it to parse). I would like to remove all re-parse steps, since we should be able to evaluate the already parsed stuff directly.

Anyway, for now this seems to work ...

@mgreter
Copy link
Contributor Author

mgreter commented Jan 20, 2016

@am11 I think we cannot prevent that popup in libsass directly, and somehow that makes sense. We don't know if the consumer is a GUI app or a console app, so the consumer should enforce that behavior. But I don't know how to apply this to ie. perl-libsass bindings for now. I actually wasn't able to include the statements I added in sassc directly into libsass, so I'm not even sure if we technically could enfore that from libsass side. Anyway this only seems to be related to debug builds, so I guess it doesn't make much sense to put too much effort into this.

@mgreter mgreter closed this Jan 20, 2016
@am11
Copy link
Contributor

am11 commented Jan 20, 2016

@mgreter, as a general practice, is the idea to handle exceptions in the LibSass for users and sanitize all the exceptions as compiler errors/warnings (for consistent experience)? It is probably a good idea to streamline exceptions in trans-compiler scenarios such as libsass. (however, this goes against the "principle of avoiding too much defensive programming" though.. 😄).

I actually wasn't able to include the statements I added in sassc directly into libsass

From C++ side, if _set_error_mode has no effect, we can try to suppress the dialog with SetErrorMode:

SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX);
_set_abort_behavior( 0, _WRITE_ABORT_MSG);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants