Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[eRFC] add -Z emit-stack-sizes #51946

Merged
merged 8 commits into from
Sep 26, 2018
Merged

Conversation

japaric
Copy link
Member

@japaric japaric commented Jun 30, 2018

What

This PR exposes LLVM's ability to report the stack usage of each function through the unstable /
experimental -Z emit-stack-sizes flag.

Motivation

The end goal is to enable whole program analysis of stack usage to prove absence of stack overflows
at compile time. Such property is important in systems that lack a MMU / MPU and where stack
overflows can corrupt memory. And in systems that have protection against stack overflows such proof
can be used to opt out of runtime checks (e.g. stack probes or the MPU).

Such analysis requires the call graph of the program, which can be obtained from MIR, and the stack
usage of each function in the program. Precise information about the later later can only be
obtained from LLVM as it depends on the optimization level and optimization options like LTO.

This PR does not attempt to add the ability to perform such whole program analysis to rustc;
it simply does the minimal amount of work to enable such analysis to be implemented out of tree.

Implementation

This PR exposes a way to set LLVM's EmitStackSizeSection option from the command line. The option
is documented here; the documentation is copied below for convenience and posteriority:

A section containing metadata on function stack sizes will be emitted when
TargetLoweringObjectFile::StackSizesSection is not null, and TargetOptions::EmitStackSizeSection
is set (-stack-size-section). The section will contain an array of pairs of function symbol values
(pointer size) and stack sizes (unsigned LEB128). The stack size values only include the space
allocated in the function prologue. Functions with dynamic stack allocations are not included.

Where the LLVM feature is not available (e.g. LLVM version < 6.0) or can't be applied (e.g. the
output format doesn't support sections e.g. .wasm files) the flag does nothing -- i.e. no error or
warning is emitted.

Example usage

$ cargo new --bin hello && cd $_

$ cat >src/main.rs <<'EOF'
use std::{mem, ptr};

fn main() {
    registers();
    stack();
}

#[inline(never)]
fn registers() {
    unsafe {
        // values loaded into registers
        ptr::read_volatile(&(0u64, 1u64));
    }
}

#[inline(never)]
fn stack() {
    unsafe {
        // array allocated on the stack
        let array: [i32; 4] = mem::uninitialized();
        for elem in &array {
            ptr::read_volatile(&elem);
        }
    }
}
EOF

$ # we need a custom linking step to preserve the .stack_sizes section
$ # (see unresolved questions for a solution that doesn't require custom linking)
$ cat > keep-stack-sizes.x <<'EOF'
SECTIONS
{
  .stack_sizes :
  {
    KEEP(*(.stack_sizes));
  }
}
EOF

$ cargo rustc --release -- \
    -Z emit-stack-sizes \
    -C link-arg=-Wl,-Tkeep-stack-sizes.x \
    -C link-arg=-N

$ size -A target/release/hello | grep stack_sizes
.stack_sizes    117   185136

Then a tool like stack-sizes can be used to print the information in human readable format

$ stack-sizes target/release/hello
address                 size    name
0x000000000004b0        0       core::array::<impl core::iter::traits::IntoIterator for &'a [T; _]>::into_iter::ha50e6661c0ec84aa
0x000000000004c0        8       std::rt::lang_start::ha02aea783e0e1b3e
0x000000000004f0        8       std::rt::lang_start::{{closure}}::h5115b527d5244952
0x00000000000500        8       core::ops::function::FnOnce::call_once::h6bfa1076da82b0fb
0x00000000000510        0       core::ptr::drop_in_place::hb4de82e57787bc70
0x00000000000520        8       hello::main::h08bb6cec0556bd66
0x00000000000530        0       hello::registers::h9d058a5d765ec1d2
0x00000000000540        24      hello::stack::h88c8cb66adfdc6f3
0x00000000000580        8       main
0x000000000005b0        0       __rust_alloc
0x000000000005c0        0       __rust_dealloc
0x000000000005d0        0       __rust_realloc
0x000000000005e0        0       __rust_alloc_zeroed

Stability

Like -Z sanitize this is a re-export of an LLVM feature. To me knowledge, we don't have a policy
about stabilization of such features as they are incompatible with, or demand extra implementation
effort from, alternative backends (e.g. cranelift). As such this feature will remain experimental /
unstable for the foreseeable future.

Unresolved questions

Section name

Should we rename the .stack_sizes section to .debug_stacksizes?

With the former name linkers will strip the section unless told otherwise using a linker script,
which means getting this information requires both knowledge about linker scripts and a custom
linker invocation (see example above).

If we use the .debug_stacksizes name (I believe) linkers will always keep the section, which means
-Z emit-stack-sizes is the only thing required to get the stack usage information.

TODOs

Investigate why this doesn't work with the thumb targets. I get the LLVM error shown below:

$ cargo new --lib foo && cd $_

$ echo '#![no_std] pub fn foo() {}' > src/lib.rs

$ cargo rustc --target thumbv7m-none-eabi -- -Z emit-stack-sizes
LLVM ERROR: unsupported relocation on symbol

which sounds like it might be related to the relocation-model option. Maybe relocation-model = static is not supported for some reason?

This fixed itself after the LLVM upgrade.


r? @nikomatsakis
cc @rust-lang/compiler @perlindgren @whitequark

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 30, 2018
@nikomatsakis
Copy link
Contributor

I have no objection to this feature per se, as long as we create a suitable tracking issue.

@stokhos stokhos added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 6, 2018
@japaric
Copy link
Member Author

japaric commented Jul 13, 2018

Update: the problem with the thumb targets that I originally reported has fixed itself after the last LLVM upgrade (yay!).

Also, I tested changing the name of the section to .debug_stacksizes and found out the following:

  • -Z emit-stack-sizes works out of the box with the thumb targets. No linker script or custom linking required. The section is kept by the linker and it's marked as non-allocatable so it doesn't waste Flash memory. Nice!

  • -Z emit-stack-sizes does not work out of the box with, say, x86_64-unknown-linux-gnu. I get a linker error that says: "sh_link of section .debug_stacksizes points to discarded section .text.(*something in core*)" when compiling with optimizations. I believe this affects all the targets that generate relocatable code. AFAICT, there are two ways to fix this error: (a) you compile your program with LTO, or (b) you use the keep-stack-sizes.x linker script with the custom linking step.

  • AFAICT, there's no LLVM API to rename the .stack_sizes section (the name is hardcoded in two different places of the LLVM source code) so I had to do the rename by patching LLVM to test this locally.

The rename seems like an overall improvement to me but it does require patching our LLVM fork, which I know we tend to avoid. Should we do the rename or not?

@stokhos
Copy link

stokhos commented Jul 21, 2018

Ping from triage! @japaric we haven't heard from you for awhile, will you have time to work on this PR?

@japaric
Copy link
Member Author

japaric commented Jul 23, 2018

@stokhos I'm waiting on feedback on my latest comment regarding doing or not the section rename in the LLVM source code.

@nikomatsakis Given that there has been no comment from other members of the compiler team can I interpret your comment as "I'll r+ this once this gets a tracking issue"?

@pietroalbini pietroalbini added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jul 30, 2018
@pietroalbini
Copy link
Member

Ping from triage @nikomatsakis! This PR needs your review.

@nikomatsakis
Copy link
Contributor

nikomatsakis commented Aug 7, 2018

@japaric

Given that there has been no comment from other members of the compiler team can I interpret your comment as "I'll r+ this once this gets a tracking issue"?

Yes, sure. Has this been done?

EDIT: Actually, an FCP is the right thing to do here. Not sure why I didn't just do it right away, sorry!

@nikomatsakis nikomatsakis added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Aug 7, 2018
@nikomatsakis
Copy link
Contributor

@rfcbot fcp merge

I propose that we merge this PR (once a suitable tracking issue has been created). This PR exposes LLVM's ability to report the stack usage of each function through the unstable /
experimental -Z emit-stack-sizes flag. See the PR header for details.

@rfcbot
Copy link

rfcbot commented Aug 7, 2018

Team member @nikomatsakis has proposed to merge this. The next step is review by the rest of the tagged teams:

No concerns currently listed.

Once a majority of reviewers approve (and none object), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up!

See this document for info about what commands tagged team members can give me.

@rfcbot rfcbot added proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. labels Aug 7, 2018
@japaric
Copy link
Member Author

japaric commented Aug 7, 2018

I'm waiting on feedback on my latest comment regarding doing or not the section rename in the LLVM source code.

Answering myself here: I think it would be best to stick to the default, hard coded value for now (what this PR does as it is). It would be cleaner to add an API that lets you rename the section to LLVM, and then we can add a rustc flag that does the rename.

@nikomatsakis

Actually, an FCP is the right thing to do here. Not sure why I didn't just do it right away, sorry!

It's OK! Thanks for starting the FCP.

@TimNN TimNN added S-waiting-on-team Status: Awaiting decision from the relevant subteam (see the T-<team> label). and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 14, 2018
@japaric
Copy link
Member Author

japaric commented Sep 1, 2018

@Zoxc @michaelwoerister @nagisa @pnkfelix ping

This is a friendly reminder to check your FCP checkboxes.

FCP request.

Whas is this feature?.

@rfcbot rfcbot added final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. and removed proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. labels Sep 1, 2018
@rfcbot
Copy link

rfcbot commented Sep 1, 2018

🔔 This is now entering its final comment period, as per the review above. 🔔

@pnkfelix pnkfelix removed the S-waiting-on-team Status: Awaiting decision from the relevant subteam (see the T-<team> label). label Sep 6, 2018
@sfackler
Copy link
Member

This should be good to go, right?

@varkor
Copy link
Member

varkor commented Sep 11, 2018

@sfackler: there's one more day of the final comment period to go, but once this has been rebased, it should be ready to merge.

@TimNN TimNN added the S-blocked Status: Marked as blocked ❌ on something else such as an RFC or other implementation work. label Sep 11, 2018
@rfcbot
Copy link

rfcbot commented Sep 11, 2018

The final comment period, with a disposition to merge, as per the review above, is now complete.

bors added a commit that referenced this pull request Sep 25, 2018
[eRFC] add -Z emit-stack-sizes

# What

This PR exposes LLVM's ability to report the stack usage of each function through the unstable /
experimental `-Z emit-stack-sizes` flag.

# Motivation

The end goal is to enable whole program analysis of stack usage to prove absence of stack overflows
at compile time. Such property is important in systems that lack a MMU / MPU and where stack
overflows can corrupt memory. And in systems that have protection against stack overflows such proof
can be used to opt out of runtime checks (e.g. stack probes or the MPU).

Such analysis requires the call graph of the program, which can be obtained from MIR, and the stack
usage of each function in the program. Precise information about the later later can only be
obtained from LLVM as it depends on the optimization level and optimization options like LTO.

This PR does **not** attempt to add the ability to perform such whole program analysis to rustc;
it simply does the minimal amount of work to enable such analysis to be implemented out of tree.

# Implementation

This PR exposes a way to set LLVM's `EmitStackSizeSection` option from the command line. The option
is documented [here]; the documentation is copied below for convenience and posteriority:

[here]: https://llvm.org/docs/CodeGenerator.html#emitting-function-stack-size-information

> A section containing metadata on function stack sizes will be emitted when
> TargetLoweringObjectFile::StackSizesSection is not null, and TargetOptions::EmitStackSizeSection
> is set (-stack-size-section). The section will contain an array of pairs of function symbol values
> (pointer size) and stack sizes (unsigned LEB128). The stack size values only include the space
> allocated in the function prologue. Functions with dynamic stack allocations are not included.

Where the LLVM feature is not available (e.g. LLVM version < 6.0) or can't be applied (e.g. the
output format doesn't support sections e.g. .wasm files) the flag does nothing -- i.e. no error or
warning is emitted.

# Example usage

``` console
$ cargo new --bin hello && cd $_

$ cat >src/main.rs <<'EOF'
use std::{mem, ptr};

fn main() {
    registers();
    stack();
}

#[inline(never)]
fn registers() {
    unsafe {
        // values loaded into registers
        ptr::read_volatile(&(0u64, 1u64));
    }
}

#[inline(never)]
fn stack() {
    unsafe {
        // array allocated on the stack
        let array: [i32; 4] = mem::uninitialized();
        for elem in &array {
            ptr::read_volatile(&elem);
        }
    }
}
EOF

$ # we need a custom linking step to preserve the .stack_sizes section
$ # (see unresolved questions for a solution that doesn't require custom linking)
$ cat > keep-stack-sizes.x <<'EOF'
SECTIONS
{
  .stack_sizes :
  {
    KEEP(*(.stack_sizes));
  }
}
EOF

$ cargo rustc --release -- \
    -Z emit-stack-sizes \
    -C link-arg=-Wl,-Tkeep-stack-sizes.x \
    -C link-arg=-N

$ size -A target/release/hello | grep stack_sizes
.stack_sizes    117   185136
```

Then a tool like [`stack-sizes`] can be used to print the information in human readable format

[`stack-sizes`]: https://github.com/japaric/stack-sizes/#stack-sizes

``` console
$ stack-sizes target/release/hello
address                 size    name
0x000000000004b0        0       core::array::<impl core::iter::traits::IntoIterator for &'a [T; _]>::into_iter::ha50e6661c0ec84aa
0x000000000004c0        8       std::rt::lang_start::ha02aea783e0e1b3e
0x000000000004f0        8       std::rt::lang_start::{{closure}}::h5115b527d5244952
0x00000000000500        8       core::ops::function::FnOnce::call_once::h6bfa1076da82b0fb
0x00000000000510        0       core::ptr::drop_in_place::hb4de82e57787bc70
0x00000000000520        8       hello::main::h08bb6cec0556bd66
0x00000000000530        0       hello::registers::h9d058a5d765ec1d2
0x00000000000540        24      hello::stack::h88c8cb66adfdc6f3
0x00000000000580        8       main
0x000000000005b0        0       __rust_alloc
0x000000000005c0        0       __rust_dealloc
0x000000000005d0        0       __rust_realloc
0x000000000005e0        0       __rust_alloc_zeroed
```

# Stability

Like `-Z sanitize` this is a re-export of an LLVM feature. To me knowledge, we don't have a policy
about stabilization of such features as they are incompatible with, or demand extra implementation
effort from, alternative backends (e.g. cranelift). As such this feature will remain experimental /
unstable for the foreseeable future.

# Unresolved questions

## Section name

Should we rename the `.stack_sizes` section to `.debug_stacksizes`?

With the former name linkers will strip the section unless told otherwise using a linker script,
which means getting this information requires both knowledge about linker scripts and a custom
linker invocation (see example above).

If we use the `.debug_stacksizes` name (I believe) linkers will always keep the section, which means
`-Z emit-stack-sizes` is the only thing required to get the stack usage information.

# ~TODOs~

~Investigate why this doesn't work with the `thumb` targets. I get the LLVM error shown below:~

``` console
$ cargo new --lib foo && cd $_

$ echo '#![no_std] pub fn foo() {}' > src/lib.rs

$ cargo rustc --target thumbv7m-none-eabi -- -Z emit-stack-sizes
LLVM ERROR: unsupported relocation on symbol
```

~which sounds like it might be related to the `relocation-model` option. Maybe `relocation-model =
static` is not supported for some reason?~

This fixed itself after the LLVM upgrade.

---

r? @nikomatsakis
cc @rust-lang/compiler @perlindgren @whitequark
@bors
Copy link
Contributor

bors commented Sep 25, 2018

💔 Test failed - status-travis

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Sep 25, 2018
@rust-highfive
Copy link
Collaborator

The job x86_64-apple of your PR failed on Travis (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
[00:03:48]       Memory: 8 GB
[00:03:48]       Boot ROM Version: VMW71.00V.0.B64.1704110547
[00:03:48]       Apple ROM Info: [MS_VM_CERT/SHA1/27d66596a61c48dd3dc7216fd715126e33f59ae7]Welcome to the Virtual Machine
[00:03:48]       SMC Version (system): 2.8f0
[00:03:48]       Serial Number (system): VMfeuoE8CHyU
[00:03:48] 
[00:03:48] hw.ncpu: 4
[00:03:48] hw.byteorder: 1234
[00:03:48] hw.memsize: 8589934592
---
[02:02:36] test [run-make] run-make-fulldeps/sysroot-crates-are-unstable ... ok
[02:02:36] 
[02:02:36] failures:
[02:02:36] 
[02:02:36] ---- [run-make] run-make-fulldeps/emit-stack-sizes stdout ----
[02:02:36] error: make failed
[02:02:36] status: exit code: 2
[02:02:36] command: "make"
[02:02:36] stdout:
[02:02:36] stdout:
[02:02:36] ------------------------------------------
[02:02:36] DYLD_LIBRARY_PATH="/Users/travis/build/rust-lang/rust/build/x86_64-apple-darwin/test/run-make-fulldeps/emit-stack-sizes/emit-stack-sizes:/Users/travis/build/rust-lang/rust/build/x86_64-apple-darwin/stage2/lib:" '/Users/travis/build/rust-lang/rust/build/x86_64-apple-darwin/stage2/bin/rustc' --out-dir /Users/travis/build/rust-lang/rust/build/x86_64-apple-darwin/test/run-make-fulldeps/emit-stack-sizes/emit-stack-sizes -L /Users/travis/build/rust-lang/rust/build/x86_64-apple-darwin/test/run-make-fulldeps/emit-stack-sizes/emit-stack-sizes  -C opt-level=3 -Z emit-stack-sizes --emit=obj foo.rs
[02:02:36] size -A /Users/travis/build/rust-lang/rust/build/x86_64-apple-darwin/test/run-make-fulldeps/emit-stack-sizes/emit-stack-sizes/foo.o | "/Users/travis/build/rust-lang/rust/src/etc/cat-and-grep.sh" .stack_sizes
[02:02:36] [[[ begin stdout ]]]
[02:02:36] /Users/travis/build/rust-lang/rust/build/x86_64-apple-darwin/test/run-make-fulldeps/emit-stack-sizes/emit-stack-sizes/foo.o  :
[02:02:36] __text            6      0
[02:02:36] __text            6      0
[02:02:36] __eh_frame       64      8
[02:02:36] 
[02:02:36] 
[02:02:36] 
[02:02:36] [[[ end stdout ]]]
[02:02:36] Error: cannot match: .stack_sizes
[02:02:36] ------------------------------------------
[02:02:36] stderr:
[02:02:36] ------------------------------------------
[02:02:36] ------------------------------------------
[02:02:36] make[1]: *** [all] Error 1
[02:02:36] ------------------------------------------
[02:02:36] 
[02:02:36] 
[02:02:36] thread '[run-make] run-make-fulldeps/emit-stack-sizes' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:3238:9
[02:02:36] 
[02:02:36] 
[02:02:36] failures:
[02:02:36]     [run-make] run-make-fulldeps/emit-stack-sizes
[02:02:36]     [run-make] run-make-fulldeps/emit-stack-sizes
[02:02:36] 
[02:02:36] test result: FAILED. 191 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out
[02:02:36] 
[02:02:36] thread 'main' panicked at 'Some tests failed', tools/compiletest/src/main.rs:496:22
[02:02:36] 
[02:02:36] 
[02:02:36] command did not execute successfully: "/Users/travis/build/rust-lang/rust/build/x86_64-apple-darwin/stage0-tools-bin/compiletest" "--compile-lib-path" "/Users/travis/build/rust-lang/rust/build/x86_64-apple-darwin/stage2/lib" "--run-lib-path" "/Users/travis/build/rust-lang/rust/build/x86_64-apple-darwin/stage2/lib/rustlib/x86_64-apple-darwin/lib" "--rustc-path" "/Users/travis/build/rust-lang/rust/build/x86_64-apple-darwin/stage2/bin/rustc" "--rustdoc-path" "/Users/travis/build/rust-lang/rust/build/x86_64-apple-darwin/stage2/bin/rustdoc" "--src-base" "/Users/travis/build/rust-lang/rust/src/test/run-make-fulldeps" "--build-base" "/Users/travis/build/rust-lang/rust/build/x86_64-apple-darwin/test/run-make-fulldeps" "--stage-id" "stage2-x86_64-apple-darwin" "--mode" "run-make" "--target" "x86_64-apple-darwin" "--host" "x86_64-apple-darwin" "--llvm-filecheck" "/Users/travis/build/rust-lang/rust/build/x86_64-apple-darwin/llvm/build/bin/FileCheck" "--nodejs" "/Users/travis/.nvm/versions/node/v6.12.3/bin/node" "--host-rustcflags" "-Crpath -O -Zunstable-options " "--target-rustcflags" "-Crpath -O -Zunstable-options  -Lnative=/Users/travis/build/rust-lang/rust/build/x86_64-apple-darwin/native/rust-test-helpers" "--docck-python" "/usr/local/opt/python/bin/python2.7" "--lldb-python" "/usr/bin/python" "--lldb-version" "lldb-902.0.73.1" "--lldb-python-dir" "/Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python" "--llvm-version" "8.0.0svn\n" "--cc" "/Users/travis/build/rust-lang/rust/clang+llvm-6.0.0-x86_64-apple-darwin/bin/clang" "--cxx" "/Users/travis/build/rust-lang/rust/clang+llvm-6.0.0-x86_64-apple-darwin/bin/clang++" "--cflags" "-ffunction-sections -fdata-sections -fPIC --target=x86_64-apple-darwin -stdlib=libc++" "--llvm-components" "aarch64 aarch64asmparser aarch64asmprinter aarch64codegen aarch64desc aarch64disassembler aarch64info aarch64utils aggressiveinstcombine all all-targets analysis arm armasmparser armasmprinter armcodegen armdesc armdisassembler arminfo armutils asmparser asmprinter binaryformat bitreader bitwriter codegen core coroutines coverage debuginfocodeview debuginfodwarf debuginfomsf debuginfopdb demangle dlltooldriver engine executionengine fuzzmutate globalisel gtest gtest_main hexagon hexagonasmparser hexagoncodegen hexagondesc hexagondisassembler hexagoninfo instcombine instrumentation interpreter ipo irreader libdriver lineeditor linker lto mc mcdisassembler mcjit mcparser mips mipsasmparser mipsasmprinter mipscodegen mipsdesc mipsdisassembler mipsinfo mirparser msp430 msp430asmprinter msp430codegen msp430desc msp430info native nativecodegen nvptx nvptxasmprinter nvptxcodegen nvptxdesc nvptxinfo objcarcopts object objectyaml option orcjit passes powerpc powerpcasmparser powerpcasmprinter powerpccodegen powerpcdesc powerpcdisassembler powerpcinfo profiledata riscv riscvasmparser riscvasmprinter riscvcodegen riscvdesc riscvdisassembler riscvinfo runtimedyld scalaropts selectiondag sparc sparcasmparser sparcasmprinter sparccodegen sparcdesc sparcdisassembler sparcinfo support symbolize systemz systemzasmparser systemzasmprinter systemzcodegen systemzdesc systemzdisassembler systemzinfo tablegen target testingsupport transformutils vectorize webassembly webassemblyasmparser webassemblyasmprinter webassemblycodegen webassemblydesc webassemblydisassembler webassemblyinfo windowsmanifest x86 x86asmparser x86asmprinter x86codegen x86desc x86disassembler x86info x86utils" "--llvm-cxxflags" "-I/Users/travis/build/rust-lang/rust/src/llvm/include -I/Users/travis/build/rust-lang/rust/build/x86_64-apple-darwin/llvm/build/include -ffunction-sections -fdata-sections -fPIC --target=x86_64-apple-darwin -stdlib=libc++ -fPIC -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -std=c++11 -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wcovered-switch-default -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wstring-conversion -O3 -DNDEBUG  -fno-exceptions -fno-rtti -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS" "--ar" "ar" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always"
[02:02:36] 
[02:02:36] 
[02:02:36] failed to run: /Users/travis/build/rust-lang/rust/build/bootstrap/debug/bootstrap test
[02:02:36] Build completed unsuccessfully in 1:07:17
[02:02:36] Build completed unsuccessfully in 1:07:17
[02:02:36] make: *** [check] Error 1
travis_time:end:0f26976c:start=1537898266290377000,finish=1537905622240666000,duration=7355950289000

The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:03a3db05
---
travis_fold:start:after_failure.2
travis_time:start:1ec1404d
$ ls -lat $HOME/Library/Logs/DiagnosticReports/
total 1608
drwx------  28 travis  staff    952 Sep 25 20:00 .
-rw-------@  1 travis  staff  13741 Sep 25 20:00 overflow_2018-09-25-200021_Traviss-Mac-1044.crash
-rw-------@  1 travis  staff   1428 Sep 25 19:59 foo_2018-09-25-195959_Traviss-Mac-1044.crash
-rw-------@  1 travis  staff   1418 Sep 25 19:59 m4_2018-09-25-195929_Traviss-Mac-1044.crash
-rw-------@  1 travis  staff   1431 Sep 25 19:59 bar_2018-09-25-195920_Traviss-Mac-1044.crash
-rw-------@  1 travis  staff  10690 Sep 25 19:59 b_2018-09-25-195919_Traviss-Mac-1044.crash
-rw-------@  1 travis  staff   1444 Sep 25 19:59 bar_2018-09-25-195919_Traviss-Mac-1044.crash
-rw-------@  1 travis  staff  62273 Sep 25 19:20 a_2018-09-25-192047_Traviss-Mac-1044.crash
-rw-------@  1 travis  staff  37510 Sep 25 19:20 a_2018-09-25-192046_Traviss-Mac-1044.crash
-rw-------@  1 travis  staff  37410 Sep 25 19:20 a_2018-09-25-192041-1_Traviss-Mac-1044.crash
-rw-------@  1 travis  staff  60415 Sep 25 19:20 a_2018-09-25-192041_Traviss-Mac-1044.crash
-rw-------@  1 travis  staff   9902 Sep 25 19:20 a_2018-09-25-192038_Traviss-Mac-1044.crash
-rw-------@  1 travis  staff   9905 Sep 25 19:20 a_2018-09-25-192036_Traviss-Mac-1044.crash
-rw-------@  1 travis  staff   9871 Sep 25 19:20 a_2018-09-25-192035_Traviss-Mac-1044.crash
-rw-------@  1 travis  staff  63155 Sep 25 19:20 a_2018-09-25-192030_Traviss-Mac-1044.crash
-rw-------@  1 travis  staff  64304 Sep 25 19:20 a_2018-09-25-192027-1_Traviss-Mac-1044.crash
-rw-------@  1 travis  staff  63943 Sep 25 19:20 a_2018-09-25-192027-2_Traviss-Mac-1044.crash
-rw-------@  1 travis  staff  65148 Sep 25 19:20 a_2018-09-25-192027_Traviss-Mac-1044.crash
-rw-------@  1 travis  staff   9926 Sep 25 19:20 a_2018-09-25-192008_Traviss-Mac-1044.crash
-rw-------@  1 travis  staff  10333 Sep 25 19:19 a_2018-09-25-191948_Traviss-Mac-1044.crash
-rw-------@  1 travis  staff  10513 Sep 25 19:19 a_2018-09-25-191933-1_Traviss-Mac-1044.crash
-rw-------@  1 travis  staff  10515 Sep 25 19:19 a_2018-09-25-191933_Traviss-Mac-1044.crash
-rw-------@  1 travis  staff  10243 Sep 25 19:19 a_2018-09-25-191924_Traviss-Mac-1044.crash
-rw-------@  1 travis  staff  37510 Sep 25 19:19 a_2018-09-25-191906-1_Traviss-Mac-1044.crash
-rw-------@  1 travis  staff  62273 Sep 25 19:19 a_2018-09-25-191906_Traviss-Mac-1044.crash
-rw-------@  1 travis  staff  60415 Sep 25 19:19 a_2018-09-25-191901-1_Traviss-Mac-1044.crash
-rw-------@  1 travis  staff  37410 Sep 25 19:19 a_2018-09-25-191901_Traviss-Mac-1044.crash
drwx------+ 15 travis  staff    510 Jan 25  2018 ..
travis_fold:end:after_failure.2
travis_fold:start:after_failure.3
travis_time:start:035b325b
$ find $HOME/Library/Logs/DiagnosticReports -type f -name '*.crash' -not -name '*.stage2-*.crash' -not -name 'com.apple.CoreSimulator.CoreSimulatorService-*.crash' -exec printf travis_fold":start:crashlog\n\033[31;1m%s\033[0m\n" {} \; -exec head -750 {} \; -exec echo travis_fold":"end:crashlog \; || true
$ find $HOME/Library/Logs/DiagnosticReports -type f -name '*.crash' -not -name '*.stage2-*.crash' -not -name 'com.apple.CoreSimulator.CoreSimulatorService-*.crash' -exec printf travis_fold":start:crashlog\n\033[31;1m%s\033[0m\n" {} \; -exec head -750 {} \; -exec echo travis_fold":"end:crashlog \; || true
travis_fold:start:crashlog
/Users/travis/Library/Logs/DiagnosticReports/a_2018-09-25-191901-1_Traviss-Mac-1044.crash
Process:               a [62562]
Path:                  /Users/USER/*/a
Identifier:            a
Version:               0
Code Type:             X86-64 (Native)
Parent Process:        a [62560]
Responsible:           a [62562]
User ID:               501
Date/Time:             2018-09-25 19:19:01.067 +0000
OS Version:            Mac OS X 10.13.3 (17D47)
Anonymous UUID:        A91A3A70-3ADA-D7A9-5891-C1A67A5778E7
Anonymous UUID:        A91A3A70-3ADA-D7A9-5891-C1A67A5778E7
Time Awake Since Boot: 5000 seconds
System Integrity Protection: enabled
Crashed Thread:        0  Dispatch queue: com.apple.main-thread
Exception Type:        EXC_BAD_ACCESS (SIGABRT)
Exception Codes:       KERN_PROTECTION_FAILURE at 0x00007ffee200bd60
Exception Note:        EXC_CORPSE_NOTIFY
VM Regions Near 0x7ffee200bd60:
    Stack Guard            00007ffee200a000-00007ffee200b000 [    4K] ---/rwx SM=NUL  
--> VM_ALLOCATE            00007ffee200b000-00007ffee200c000 [    4K] ---/rwx SM=NUL  
    Stack                  00007ffee200c000-00007ffee600a000 [ 64.0M] rw-/rwx SM=COW  
abort() called
abort() called
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   libsystem_kernel.dylib         0x00007fff7066ce3e __pthread_kill + 10
1   libsystem_pthread.dylib        0x00007fff707ab150 pthread_kill + 333
2   libsystem_c.dylib              0x00007fff705c9312 abort + 127
3   libstd-7a48a99fa0910c06.dylib  0x0000000109c29d59 std::sys::unix::abort_internal::hed1a563349acc5db + 9
4   libstd-7a48a99fa0910c06.dylib  0x0000000109c35ffb std::sys_common::util::abort::h28c544a35c3e8f78 + 91
5   libstd-7a48a99fa0910c06.dylib  0x0000000109c0d5a9 std::sys::unix::stack_overflow::imp::signal_handler::ha6c9c66937b2b6be (.llvm.11206483348986291933) + 153
6   libsystem_platform.dylib       0x00007fff7079ef5a _sigtramp + 26
7   ???                            000000000000000000 0 + 0
8   a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
9   a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
10  a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
11  a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
12  a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
13  a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
14  a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
15  a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
16  a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
17  a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
18  a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
19  a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
20  a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
21  a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
22  a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
23  a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
24  a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
25  a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
26  a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
27  a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
28  a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
29  a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
30  a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
31  a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
32  a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
33  a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
34  a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
35  a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
36  a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
37  a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
38  a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
39  a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
40  a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
41  a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
42  a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
43  a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
44  a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
45  a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
46  a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
47  a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
48  a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
49  a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
50  a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
51  a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
52  a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
53  a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
54  a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
55  a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
56  a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
57  a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
58  a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
59  a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
60  a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
61  a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
62  a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
63  a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
64  a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
65  a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
66  a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
67  a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
68  a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
69  a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
70  a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
71  a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
72  a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
73  a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
74  a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
75  a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
76  a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
77  a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
78  a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
79  a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
80  a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
81  a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
82  a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
83  a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
84  a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
85  a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
86  a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
87  a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
88  a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
89  a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
90  a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
91  a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
92  a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
93  a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
94  a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
95  a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
96  a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
97  a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
98  a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
99  a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
100 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
101 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
102 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
103 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
104 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
105 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
106 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
107 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
108 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
109 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
110 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
111 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
112 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
113 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
114 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
115 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
116 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
117 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
118 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
119 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
120 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
121 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
122 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
123 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
124 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
125 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
126 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
127 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
128 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
129 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
130 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
131 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
132 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
133 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
134 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
135 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
136 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
137 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
138 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
139 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
140 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
141 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
142 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
143 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
144 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
145 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
146 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
147 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
148 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
149 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
150 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
151 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
152 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
153 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
154 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
155 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
156 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
157 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
158 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
159 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
160 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
161 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
162 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
163 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
164 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
165 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
166 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
167 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
168 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
169 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
170 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
171 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
172 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
173 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
174 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
175 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
176 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
177 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
178 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
179 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
180 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
181 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
182 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
183 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
184 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
185 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
186 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
187 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
188 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
189 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
190 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
191 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
192 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
193 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
194 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
195 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
196 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
197 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
198 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
199 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
200 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
201 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
202 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
203 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
204 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
205 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
206 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
207 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
208 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
209 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
210 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
211 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
212 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
213 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
214 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
215 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
216 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
217 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
218 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
219 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
220 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
221 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
222 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
223 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
224 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
225 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
226 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
227 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
228 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
229 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
230 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
231 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
232 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
233 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
234 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
235 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
236 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
237 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
238 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
239 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
240 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
241 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
242 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
243 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
244 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
245 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
246 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
247 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
248 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
249 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
250 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
251 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
252 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
253 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
254 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
255 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
256 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
257 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
258 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
259 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
260 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
261 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
262 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
263 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
264 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
265 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
266 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
267 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
268 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
269 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
270 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
271 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
272 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
273 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
274 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
275 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
276 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
277 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
278 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
279 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
280 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
281 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
282 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
283 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
284 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
285 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
286 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
287 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
288 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
289 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
290 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
291 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
292 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
293 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
294 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
295 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
296 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
297 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
298 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
299 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
300 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
301 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
302 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
303 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
304 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
305 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
306 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
307 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
308 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
309 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
310 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
311 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
312 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
313 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
314 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
315 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
316 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
317 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
318 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
319 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
320 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
321 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
322 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
323 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
324 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
325 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
326 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
327 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
328 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
329 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
330 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
331 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
332 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
333 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
334 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
335 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
336 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
337 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
338 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
339 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
340 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
341 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
342 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
343 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
344 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
345 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
346 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
347 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
348 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
349 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
350 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
351 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
352 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
353 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
354 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
355 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
356 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
357 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
358 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
359 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
360 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
361 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
362 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
363 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
364 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
365 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
366 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
367 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
368 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
369 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
370 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
371 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
372 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
373 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
374 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
375 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
376 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
377 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
378 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
379 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
380 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
381 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
382 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
383 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
384 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
385 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
386 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
387 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
388 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
389 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
390 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
391 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
392 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
393 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
394 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
395 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
396 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
397 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
398 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
399 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
400 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
401 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
402 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
403 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
404 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
405 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
406 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
407 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
408 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
409 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
410 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
411 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
412 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
413 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
414 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
415 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
416 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
417 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
418 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
419 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
420 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
421 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
422 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
423 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
424 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
425 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
426 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
427 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
428 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
429 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
430 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
431 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
432 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
433 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
434 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34
435 a                              0x0000000109bf8722 stack_probes::recurse::h5b19fb02dc377c0b + 34

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@kennytm kennytm added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 26, 2018
@japaric
Copy link
Member Author

japaric commented Sep 26, 2018

Test failed - status-travis

emit-stack-sizes only works when the output format is ELF (that functions returns a null pointer when the target format is not ELF).

I'll update the docs and make the test ignore mac.

@japaric
Copy link
Member Author

japaric commented Sep 26, 2018

@bors r=nikomatsakis

@bors
Copy link
Contributor

bors commented Sep 26, 2018

📌 Commit 531e356 has been approved by nikomatsakis

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Sep 26, 2018
@bors
Copy link
Contributor

bors commented Sep 26, 2018

⌛ Testing commit 531e356 with merge 6846f22...

bors added a commit that referenced this pull request Sep 26, 2018
[eRFC] add -Z emit-stack-sizes

# What

This PR exposes LLVM's ability to report the stack usage of each function through the unstable /
experimental `-Z emit-stack-sizes` flag.

# Motivation

The end goal is to enable whole program analysis of stack usage to prove absence of stack overflows
at compile time. Such property is important in systems that lack a MMU / MPU and where stack
overflows can corrupt memory. And in systems that have protection against stack overflows such proof
can be used to opt out of runtime checks (e.g. stack probes or the MPU).

Such analysis requires the call graph of the program, which can be obtained from MIR, and the stack
usage of each function in the program. Precise information about the later later can only be
obtained from LLVM as it depends on the optimization level and optimization options like LTO.

This PR does **not** attempt to add the ability to perform such whole program analysis to rustc;
it simply does the minimal amount of work to enable such analysis to be implemented out of tree.

# Implementation

This PR exposes a way to set LLVM's `EmitStackSizeSection` option from the command line. The option
is documented [here]; the documentation is copied below for convenience and posteriority:

[here]: https://llvm.org/docs/CodeGenerator.html#emitting-function-stack-size-information

> A section containing metadata on function stack sizes will be emitted when
> TargetLoweringObjectFile::StackSizesSection is not null, and TargetOptions::EmitStackSizeSection
> is set (-stack-size-section). The section will contain an array of pairs of function symbol values
> (pointer size) and stack sizes (unsigned LEB128). The stack size values only include the space
> allocated in the function prologue. Functions with dynamic stack allocations are not included.

Where the LLVM feature is not available (e.g. LLVM version < 6.0) or can't be applied (e.g. the
output format doesn't support sections e.g. .wasm files) the flag does nothing -- i.e. no error or
warning is emitted.

# Example usage

``` console
$ cargo new --bin hello && cd $_

$ cat >src/main.rs <<'EOF'
use std::{mem, ptr};

fn main() {
    registers();
    stack();
}

#[inline(never)]
fn registers() {
    unsafe {
        // values loaded into registers
        ptr::read_volatile(&(0u64, 1u64));
    }
}

#[inline(never)]
fn stack() {
    unsafe {
        // array allocated on the stack
        let array: [i32; 4] = mem::uninitialized();
        for elem in &array {
            ptr::read_volatile(&elem);
        }
    }
}
EOF

$ # we need a custom linking step to preserve the .stack_sizes section
$ # (see unresolved questions for a solution that doesn't require custom linking)
$ cat > keep-stack-sizes.x <<'EOF'
SECTIONS
{
  .stack_sizes :
  {
    KEEP(*(.stack_sizes));
  }
}
EOF

$ cargo rustc --release -- \
    -Z emit-stack-sizes \
    -C link-arg=-Wl,-Tkeep-stack-sizes.x \
    -C link-arg=-N

$ size -A target/release/hello | grep stack_sizes
.stack_sizes    117   185136
```

Then a tool like [`stack-sizes`] can be used to print the information in human readable format

[`stack-sizes`]: https://github.com/japaric/stack-sizes/#stack-sizes

``` console
$ stack-sizes target/release/hello
address                 size    name
0x000000000004b0        0       core::array::<impl core::iter::traits::IntoIterator for &'a [T; _]>::into_iter::ha50e6661c0ec84aa
0x000000000004c0        8       std::rt::lang_start::ha02aea783e0e1b3e
0x000000000004f0        8       std::rt::lang_start::{{closure}}::h5115b527d5244952
0x00000000000500        8       core::ops::function::FnOnce::call_once::h6bfa1076da82b0fb
0x00000000000510        0       core::ptr::drop_in_place::hb4de82e57787bc70
0x00000000000520        8       hello::main::h08bb6cec0556bd66
0x00000000000530        0       hello::registers::h9d058a5d765ec1d2
0x00000000000540        24      hello::stack::h88c8cb66adfdc6f3
0x00000000000580        8       main
0x000000000005b0        0       __rust_alloc
0x000000000005c0        0       __rust_dealloc
0x000000000005d0        0       __rust_realloc
0x000000000005e0        0       __rust_alloc_zeroed
```

# Stability

Like `-Z sanitize` this is a re-export of an LLVM feature. To me knowledge, we don't have a policy
about stabilization of such features as they are incompatible with, or demand extra implementation
effort from, alternative backends (e.g. cranelift). As such this feature will remain experimental /
unstable for the foreseeable future.

# Unresolved questions

## Section name

Should we rename the `.stack_sizes` section to `.debug_stacksizes`?

With the former name linkers will strip the section unless told otherwise using a linker script,
which means getting this information requires both knowledge about linker scripts and a custom
linker invocation (see example above).

If we use the `.debug_stacksizes` name (I believe) linkers will always keep the section, which means
`-Z emit-stack-sizes` is the only thing required to get the stack usage information.

# ~TODOs~

~Investigate why this doesn't work with the `thumb` targets. I get the LLVM error shown below:~

``` console
$ cargo new --lib foo && cd $_

$ echo '#![no_std] pub fn foo() {}' > src/lib.rs

$ cargo rustc --target thumbv7m-none-eabi -- -Z emit-stack-sizes
LLVM ERROR: unsupported relocation on symbol
```

~which sounds like it might be related to the `relocation-model` option. Maybe `relocation-model =
static` is not supported for some reason?~

This fixed itself after the LLVM upgrade.

---

r? @nikomatsakis
cc @rust-lang/compiler @perlindgren @whitequark
@bors
Copy link
Contributor

bors commented Sep 26, 2018

☀️ Test successful - status-appveyor, status-travis
Approved by: nikomatsakis
Pushing 6846f22 to master...

@bors bors merged commit 531e356 into rust-lang:master Sep 26, 2018
bors bot added a commit to rust-embedded/cortex-m-rt that referenced this pull request Sep 28, 2018
118: [RFC] Keep `.stack_sizes` r=japaric a=japaric

PR [rust-lang/rust#51946] will add a `-Z emit-stack-sizes` to `rustc` that can
be used to (make LLVM) emit stack usage metadata. Most linkers will discard this
metadata by default, however.

[rust-lang/rust#51946]: rust-lang/rust#51946

This PR / RFC proposes that we modify our linker script to keep this metadata
and place in an output `.stack_sizes` section (the canonical section name that
LLVM uses for this metadata).

This `.stack_sizes` section will be marked as `(INFO)` meaning that it won't be
loaded into the Flash or RAM of the target device.

The advantage of doing this is that tools that parse this information will work
out of the box. See examples at the bottom.

Not doing this means that users will have to mess with linker scripts and tweak
the linking process to be able to access the stack usage metadata. See [this
example] to get an idea of the required steps to keep the metadata information.

[this example]: https://github.com/japaric/stack-sizes#example-usage

# Examples

Using the [`cargo stack-sizes`] subcommand to build a project and print its
stack usage information. Assumes that this PR has been merged.

[`cargo stack-sizes`]: https://github.com/japaric/stack-sizes

``` console
$ cargo stack-sizes --bin app -v
RUSTC=stack-sizes-rustc "cargo" "rustc" "--bin" "app" "--"
    Finished dev [unoptimized + debuginfo] target(s) in 0.01s
"stack-sizes" "target/thumbv7m-none-eabi/debug/app"
address         stack   name
0x00000416      112     <cortex_m_rt::ExceptionFrame as core::fmt::Debug>::fmt::h4362577979112554
0x0000059e      96      <<cortex_m_rt::ExceptionFrame as core::fmt::Debug>::fmt::Hex as core::fmt::Debug>::fmt::hd24e21694d63c2ec
0x0000069c      72      core::fmt::Arguments::new_v1_formatted::hc22bfa5fcec35f0e
0x00000758      48      r0::init_data::hdc91f9605f364aeb
0x00000710      40      r0::zero_bss::h24ed73bae17eec88
0x000007d8      24      core::ptr::<impl *mut T>::offset::h940561014e707589
0x000007fc      24      core::ptr::<impl *const T>::offset::h6847f0bc0fe1f0b5
0x00000820      24      core::ptr::read::ha83613479c1b8688
0x00000858      24      core::sync::atomic::compiler_fence::h89dd3725007a5019
0x00002cb0      24      core::sync::atomic::compiler_fence::h4e6eb311378b7447
0x00000668      16      UserHardFault_
0x000007be      16      core::ptr::write_volatile::h92be4be56d39953d
0x00000840      16      core::ptr::write::h1bff45e7fbd786f1
0x00002c92      16      rust_begin_unwind
0x00000404      8       main
0x0000061c      8       Reset
0x00000684      8       SysTick
0x000006fc      8       core::ptr::drop_in_place::h96b0344554e68fcb
0x0000089c      8       core::mem::uninitialized::hea41370061be039b
0x000008aa      8       core::mem::zeroed::h87926bff0ea7d7b3
0x00000400      0       app::main::hb1f6f4352b7a35e2
0x0000069a      0       __pre_init
```

``` console
$ cargo stack-sizes --bin app --release -v
RUSTC=stack-sizes-rustc "cargo" "rustc" "--bin" "app" "--release" "--"
    Finished release [optimized + debuginfo] target(s) in 0.01s
"stack-sizes" "target/thumbv7m-none-eabi/release/app"
address         stack   name
0x00000400      0       main
0x00000402      0       Reset
0x00000616      0       UserHardFault_
0x00000618      0       SysTick
0x0000061a      0       __pre_init
```

---

r? @rust-embedded/cortex-m does this seem like a reasonable addition? Or do you think keeping .stack_sizes should *not* be done in this crate?

Co-authored-by: Jorge Aparicio <[email protected]>
@japaric japaric deleted the emit-stack-sizes branch September 29, 2018 19:02
adamgreig pushed a commit to rust-embedded/cortex-m that referenced this pull request Jan 12, 2022
118: [RFC] Keep `.stack_sizes` r=japaric a=japaric

PR [rust-lang/rust#51946] will add a `-Z emit-stack-sizes` to `rustc` that can
be used to (make LLVM) emit stack usage metadata. Most linkers will discard this
metadata by default, however.

[rust-lang/rust#51946]: rust-lang/rust#51946

This PR / RFC proposes that we modify our linker script to keep this metadata
and place in an output `.stack_sizes` section (the canonical section name that
LLVM uses for this metadata).

This `.stack_sizes` section will be marked as `(INFO)` meaning that it won't be
loaded into the Flash or RAM of the target device.

The advantage of doing this is that tools that parse this information will work
out of the box. See examples at the bottom.

Not doing this means that users will have to mess with linker scripts and tweak
the linking process to be able to access the stack usage metadata. See [this
example] to get an idea of the required steps to keep the metadata information.

[this example]: https://github.com/japaric/stack-sizes#example-usage

# Examples

Using the [`cargo stack-sizes`] subcommand to build a project and print its
stack usage information. Assumes that this PR has been merged.

[`cargo stack-sizes`]: https://github.com/japaric/stack-sizes

``` console
$ cargo stack-sizes --bin app -v
RUSTC=stack-sizes-rustc "cargo" "rustc" "--bin" "app" "--"
    Finished dev [unoptimized + debuginfo] target(s) in 0.01s
"stack-sizes" "target/thumbv7m-none-eabi/debug/app"
address         stack   name
0x00000416      112     <cortex_m_rt::ExceptionFrame as core::fmt::Debug>::fmt::h4362577979112554
0x0000059e      96      <<cortex_m_rt::ExceptionFrame as core::fmt::Debug>::fmt::Hex as core::fmt::Debug>::fmt::hd24e21694d63c2ec
0x0000069c      72      core::fmt::Arguments::new_v1_formatted::hc22bfa5fcec35f0e
0x00000758      48      r0::init_data::hdc91f9605f364aeb
0x00000710      40      r0::zero_bss::h24ed73bae17eec88
0x000007d8      24      core::ptr::<impl *mut T>::offset::h940561014e707589
0x000007fc      24      core::ptr::<impl *const T>::offset::h6847f0bc0fe1f0b5
0x00000820      24      core::ptr::read::ha83613479c1b8688
0x00000858      24      core::sync::atomic::compiler_fence::h89dd3725007a5019
0x00002cb0      24      core::sync::atomic::compiler_fence::h4e6eb311378b7447
0x00000668      16      UserHardFault_
0x000007be      16      core::ptr::write_volatile::h92be4be56d39953d
0x00000840      16      core::ptr::write::h1bff45e7fbd786f1
0x00002c92      16      rust_begin_unwind
0x00000404      8       main
0x0000061c      8       Reset
0x00000684      8       SysTick
0x000006fc      8       core::ptr::drop_in_place::h96b0344554e68fcb
0x0000089c      8       core::mem::uninitialized::hea41370061be039b
0x000008aa      8       core::mem::zeroed::h87926bff0ea7d7b3
0x00000400      0       app::main::hb1f6f4352b7a35e2
0x0000069a      0       __pre_init
```

``` console
$ cargo stack-sizes --bin app --release -v
RUSTC=stack-sizes-rustc "cargo" "rustc" "--bin" "app" "--release" "--"
    Finished release [optimized + debuginfo] target(s) in 0.01s
"stack-sizes" "target/thumbv7m-none-eabi/release/app"
address         stack   name
0x00000400      0       main
0x00000402      0       Reset
0x00000616      0       UserHardFault_
0x00000618      0       SysTick
0x0000061a      0       __pre_init
```

---

r? @rust-embedded/cortex-m does this seem like a reasonable addition? Or do you think keeping .stack_sizes should *not* be done in this crate?

Co-authored-by: Jorge Aparicio <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. finished-final-comment-period The final comment period is finished for this PR / Issue. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.