Skip to content

Commit

Permalink
FIXME(#19497) -- Stop messing around and just give rustc 32MB of stac…
Browse files Browse the repository at this point in the history
…k unconditionally. This is prompted by some sort of bug in trans that causes a stack overflow when the modules in trans are made private. (In particular, the overflow can also be avoided by making `controlflow` and `callee` public, but that seems strictly worse than just using more stack.)
  • Loading branch information
nikomatsakis committed Dec 3, 2014
1 parent 310255c commit 39eed46
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/librustc_driver/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -470,13 +470,7 @@ pub fn list_metadata(sess: &Session, path: &Path,
/// The diagnostic emitter yielded to the procedure should be used for reporting
/// errors of the compiler.
pub fn monitor(f: proc():Send) {
// FIXME: This is a hack for newsched since it doesn't support split stacks.
// rustc needs a lot of stack! When optimizations are disabled, it needs
// even *more* stack than usual as well.
#[cfg(rtopt)]
static STACK_SIZE: uint = 6000000; // 6MB
#[cfg(not(rtopt))]
static STACK_SIZE: uint = 20000000; // 20MB
static STACK_SIZE: uint = 32000000; // 32MB

let (tx, rx) = channel();
let w = io::ChanWriter::new(tx);
Expand Down

5 comments on commit 39eed46

@nikomatsakis
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r=acrichto

@bors
Copy link
Contributor

@bors bors commented on 39eed46 Dec 3, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from alexcrichton
at nikomatsakis@39eed46

@bors
Copy link
Contributor

@bors bors commented on 39eed46 Dec 3, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging nikomatsakis/rust/crateification = 39eed46 into auto

@bors
Copy link
Contributor

@bors bors commented on 39eed46 Dec 3, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nikomatsakis/rust/crateification = 39eed46 merged ok, testing candidate = ee6ab1b3

Please sign in to comment.