FIXME(#19497) -- Stop messing around and just give rustc 32MB of stack 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.)
This commit is contained in:
parent
61edb0ccb7
commit
5d19432679
1 changed files with 1 additions and 7 deletions
|
@ -470,13 +470,7 @@ pub fn list_metadata(sess: &Session, path: &Path,
|
||||||
/// The diagnostic emitter yielded to the procedure should be used for reporting
|
/// The diagnostic emitter yielded to the procedure should be used for reporting
|
||||||
/// errors of the compiler.
|
/// errors of the compiler.
|
||||||
pub fn monitor(f: proc():Send) {
|
pub fn monitor(f: proc():Send) {
|
||||||
// FIXME: This is a hack for newsched since it doesn't support split stacks.
|
static STACK_SIZE: uint = 32000000; // 32MB
|
||||||
// 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
|
|
||||||
|
|
||||||
let (tx, rx) = channel();
|
let (tx, rx) = channel();
|
||||||
let w = io::ChanWriter::new(tx);
|
let w = io::ChanWriter::new(tx);
|
||||||
|
|
Loading…
Reference in a new issue