Skip to content

Stack overflow in rustdoc test. #18801

@aatxe

Description

@aatxe

When I run both cargo test and rustdoc --test src/lib.rs with this crate, I experience a stack overflow as so:

cargo test

task '<main>' has overflowed its stack
Process didn't exit successfully: `rustdoc --test /Users/Aaron/Documents/Programming/Rust/irc/src/lib.rs --crate-name irc -L /Users/Aaron/Documents/Programming/Rust/irc/target -L /Users/Aaron/Documents/Programming/Rust/irc/target/deps --extern irc=/Users/Aaron/Documents/Programming/Rust/irc/target/libirc-3f763cf8257f2e48.rlib` (status=4)

rustdoc --test src/lib.rs

task '<main>' has overflowed its stack
Illegal instruction: 4

I'm on OS X 10.10.1. I've installed rust using rustup. The output of rustdoc --version=verbose is:

rustdoc 0.13.0-nightly
binary: rustdoc
commit-hash: unknown
commit-date: unknown
host: x86_64-apple-darwin
release: 0.13.0-nightly

I am not experiencing this issue on Travis-CI, where instead it terminates properly.

Here's the results of running the command in lldb:

(lldb) r --test src/lib.rs
Process 54758 launched: '/usr/local/bin/rustdoc' (x86_64)
Process 54758 stopped
* thread #1: tid = 0x1fad6c, 0x0000000102df0c5b libsyntax-4e7c5e5c.dylib`fold::Vec$LT$T$GT$.MoveMap$LT$T$GT$::move_map::h3105311920876362688 + 75, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=2, address=0x7fff5fb80ff8)
    frame #0: 0x0000000102df0c5b libsyntax-4e7c5e5c.dylib`fold::Vec$LT$T$GT$.MoveMap$LT$T$GT$::move_map::h3105311920876362688 + 75
libsyntax-4e7c5e5c.dylib`fold::Vec$LT$T$GT$.MoveMap$LT$T$GT$::move_map::h3105311920876362688 + 75:
-> 0x102df0c5b:  movq   %rdi, -0x158(%rbp)
   0x102df0c62:  movq   0x8(%rsi), %rax
   0x102df0c66:  testq  %rax, %rax
   0x102df0c69:  je     0x102df0ebd               ; fold::Vec$LT$T$GT$.MoveMap$LT$T$GT$::move_map::h3105311920876362688 + 685

A full backtrace (from running bt) can be found here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    I-crashIssue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.O-macosOperating system: macOST-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions