#endif
MORESTACK:
-#ifdef __linux__
+#if defined(__linux__) || defined(__APPLE__)
.cfi_startproc
#endif
pushl %ebp
-#ifdef __linux__
+#if defined(__linux__) || defined(__APPLE__)
.cfi_def_cfa_offset 8
.cfi_offset %ebp, -8
#endif
movl %esp, %ebp
-#ifdef __linux__
+#if defined(__linux__) || defined(__APPLE__)
.cfi_def_cfa_register %ebp
#endif
jz .L$bail
// During unwinding we want to skip our caller.
-#ifdef __linux__
+#if defined(__linux__) || defined(__APPLE__)
// Don't understand this line. I think it means that
// the next frame's pc is the return address of our caller.
.cfi_offset 8, 8
addl $16,%esp
popl %ebp
-#ifdef __linux__
+#if defined(__linux__) || defined(__APPLE__)
.cfi_restore %ebp
.cfi_def_cfa %esp, 4
#endif
jmpl *%edx
-#ifdef __linux__
+#if defined(__linux__) || defined(__APPLE__)
.cfi_endproc
#endif
#if defined(__linux__) || defined(__APPLE__)
MORESTACK:
-#if defined(__ELF__)
.cfi_startproc
-#endif
// Set up a normal backtrace
pushq %rbp
-#if defined(__ELF__)
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
-#endif
movq %rsp, %rbp
-#if defined(__ELF__)
.cfi_def_cfa_register %rbp
-#endif
// During unwinding we want to skip our caller since it's not
// a complete frame and will make the unwinder sad
-#if defined(__linux__)
// Don't understand this line
.cfi_offset 16, 0
// Tell the unwinding where to get the stack pointer for
// our grandparent frame
.cfi_offset %rsp, -24
-#endif
// Save the grandparent stack pointer for the unwinder
leaq 16(%rbp), %rax
addq $8, %rsp
popq %rbp
-#ifdef __linux__
.cfi_restore %rbp
.cfi_def_cfa %rsp, 8
-#endif
ret
-#if defined(__ELF__)
.cfi_endproc
-#endif
#else
MORESTACK:
}
fn main() {
- rustrt::set_min_stack(256u);
+ rustrt::set_min_stack(1024u);
std::task::spawn((), fn (&&_i: ()) {
let r = and_then_get_big_again(());
getbig_call_c_and_fail(10000);
}
fn main() {
- rustrt::set_min_stack(256u);
- std::task::spawn(100, getbig_and_fail);
+ rustrt::set_min_stack(1024u);
+ std::task::spawn(400, getbig_and_fail);
}
\ No newline at end of file