chriseppstein/compass — Issue #650: Circular or self reference exhausts resources
Author: Pichirho
Created: 2011-12-16 07:56:38+00:00
State: open

If you import a self referencing file, compass may exhaust all memory.

### _self.scss

@import "compass/css3"; // get something BIG to parse
@import "self";
/* Put here lots of css/sass/scss if you want to exhaust all memory */

### crasher.scss

@import "self";

## Expected results

The parser should notice a self reference or a circular reference and stop parsing with an error.

## Actual results

When compass detects a change in crasher.scss, it includes _self.scss until it fails with `SystemStackError on line ["10"] of C: stack level too deep` or the OS crashes if the available memory is exhausted before that.