Not on stable/beta.
brian@ip-10-145-43-250:~⟫ rustc +nightly -Vv
rustc 1.16.0-nightly (47c8d9fdc 2017-01-08)
LLVM version: 3.9
brian@ip-10-145-43-250:~/dev/s-structured-log-rs⟫ cargo +nightly test
Updating registry `https://github.com/rust-lang/crates.io-index`
Compiling itoa v0.1.1
Compiling num-traits v0.1.36
Compiling log v0.3.6
Compiling serde v0.8.21
Compiling dtoa v0.2.2
Compiling serde_json v0.8.4
Compiling s-structured-log v0.2.0 (file:///mnt2/dev/s-structured-log-rs)
Finished debug [unoptimized + debuginfo] target(s) in 15.91 secs
running 5 tests
test tests::json_format ... ok
test tests::no_escape_chars ... ok
test tests::only_escape_chars ... ok
test tests::random_escape_chars ... ok
test tests::simple_logger ... ok
test result: ok. 5 passed; 0 failed; 0 ignored; 0 measured
running 6 tests
thread '_1' has overflowed its stack
fatal runtime error: stack overflow
error: test failed
Need to try to extract a test case from the docs.
Stack trace. Stack overflow is in rustc.
The overflow happens on this example and doesn't reproduce in rustc alone, may have to do something with how rustdoc calls the compiler.
Seems like rustdoc doesn't use the monitor that allocates a big ol' stack. Some stack size fluctuation does occur from time to time, could be that.
Hmm, I can't reproduce the problem, but I can produce a PR to at least get rustdoc to run compiler the same way it runs everything else when doing tests.
Hmm, so, I had thought to just run this code in driver::monitor, but that actually swallows panics and invokes exit(), and this code is running in the test harness, so that's not a particularly good idea.
I am testing @nikomatsakis's patch. FWIW I cannot repro on the 01-13 nightly, only the one listed in the op.
With @nikomatsakis's patch on top of the commit in the op the bug does not reproduce.
Rollup merge of #39142 - nikomatsakis:issue-38973, r=brson
run rustdoc tests in the same sort of thread rustc runs in
Not sure yet if this is the problem in #38973 but seems like an improvement regardless.