about summary refs log tree commit diff
path: root/src/rt/arch/i386/morestack.S
AgeCommit message (Collapse)AuthorLines
2015-08-10Remove morestack supportAlex Crichton-143/+0
This commit removes all morestack support from the compiler which entails: * Segmented stacks are no longer emitted in codegen. * We no longer build or distribute libmorestack.a * The `stack_exhausted` lang item is no longer required The only current use of the segmented stack support in LLVM is to detect stack overflow. This is no longer really required, however, because we already have guard pages for all threads and registered signal handlers watching for a segfault on those pages (to print out a stack overflow message). Additionally, major platforms (aka Windows) already don't use morestack. This means that Rust is by default less likely to catch stack overflows because if a function takes up more than one page of stack space it won't hit the guard page. This is what the purpose of morestack was (to catch this case), but it's better served with stack probes which have more cross platform support and no runtime support necessary. Until LLVM supports this for all platform it looks like morestack isn't really buying us much. cc #16012 (still need stack probes) Closes #26458 (a drive-by fix to help diagnostics on stack overflow)
2015-06-15src/rt/arch/i386/morestack.S: call rust_stack_exhausted via pltSteven Walter-3/+2
This prevents a relocation in the text section. Text relocations are incompatible with hardened kernels. https://github.com/rust-lang/rust/issues/5714
2013-10-22Fix unwinding on OS X 10.9.Mark Rowe-3/+12
OS X 10.9's linker has a bug that results in it failing to preserve DWARF unwind information when passed the -no_compact_unwind flag. This flag is passed on OS X because the unwind information for __morestack cannot be represented by the compact unwind format. We can work around this problem by using a more targeted approach to disabling compact unwind information. The OS X linker looks for a particular pattern in the DWARF unwind information and will not attempt to convert the unwind information to the compact format. The pattern in question is the return address register being saved twice to the same location. Fixes #6849.
2013-10-19Use __morestack to detect stack overflowAlex Crichton-148/+26
This commit resumes management of the stack boundaries and limits when switching between tasks. This additionally leverages the __morestack function to run code on "stack overflow". The current behavior is to abort the process, but this is probably not the best behavior in the long term (for deails, see the comment I wrote up in the stack exhaustion routine).
2013-08-22Emit unwind info in rustrt assembly files on Windows.Vadim Chugunov-5/+5
2013-06-16Partial fix for #7158: Save EDX in morestack on x86-32Niko Matsakis-0/+2
2013-06-06Deduplicate words in code commentsAlexei Sholik-4/+4
2013-05-03add gitattributes and fix whitespace issuesDaniel Micay-2/+1
2013-03-31mark the assembly object stacks as non-executableDaniel Micay-3/+8
Closes #5643 This also removes the need to pass noexecstack to gcc, but that wasn't actually working anymore.
2012-06-21Try removing code marked with "I don't think this is necessary"Tim Chevalier-9/+0
2012-01-01freebsd supportUser Jyyou-7/+7
2011-12-29Save and restore xmm regs across the call to UPCALL_NEW_STACK during ↵Graydon Hoare-0/+3
__morestack, close #1388.
2011-12-29Remove obsolete comments.Graydon Hoare-3/+0
2011-12-19rt: Save and restore %rax/%eax in __morestackBrian Anderson-0/+6
This doesn't matter now since we use an out pointer for return values but it's sure to show up mysteriously someday.
2011-12-19rt: Remove some unused stack from i386/morestack.SBrian Anderson-9/+9
2011-12-19rt: Remove unused saves from __morestackBrian Anderson-6/+0
2011-12-19rt: Give upcall_new_stack the same convention as other upcallsBrian Anderson-31/+13
2011-12-19rt: Give upcall_del_stack the same convention as other upcallsBrian Anderson-18/+9
2011-12-18rt: Add lots of documentation to __morestackBrian Anderson-19/+116
2011-12-17rt: Use a DWARF CFI scheme that works on mac in __morestackBrian Anderson-13/+3
2011-12-16rt: Make 32-bit morestack compatible with fastccBrian Anderson-9/+18
2011-12-16rt: Fix alignment of the call to upcall_del_stack in __morestackBrian Anderson-2/+7
2011-12-13rt: Add a FIXME to 32-bit __morestack about trashing %eaxBrian Anderson-1/+2
2011-12-13rt: Use %ecx instead of %eax during the second half of __morestackBrian Anderson-3/+5
If Rust code made use of return values then using %eax here would clobber it
2011-12-13rt: Don't clobber fastcc argument registers in __morestackBrian Anderson-12/+15
2011-12-11rt: Make unwinding through __morestack work on macBrian Anderson-6/+6
Had to bump the min stack size in some of the tests from 256 bytes to 1024 bytes. Not sure why yet.
2011-12-11rt: Write CFI instructions that (might) work on mac in __morestackBrian Anderson-7/+16
The DW_CFA_val_offset_sf instruction doesn't seem to work on mac, even after implementing it in the llvm-mc assembler, so now I'm looking for a different way to communicate the stack pointer adjustment to the unwinder.
2011-12-10build: Use llvm-mc as our assemblerBrian Anderson-0/+2
LLVM's assembler understands .cfi pseudo-ops on the mac, which we need in order to generate frames that can be DWARF-unwound
2011-12-08rt: Make __morestack work on win32Brian Anderson-7/+1
2011-12-05rt: Use an out pointer for rust_new_stackBrian Anderson-4/+5
upcall_call_shim_on_c_stack does not handle return values
2011-12-05rt: Unwind through __morestack on 32-bit linuxBrian Anderson-0/+24
2011-12-04rt: Update 32-bit __morestack for recent LLVM changesBrian Anderson-16/+13
2011-12-02rt: Implement 32-bit __morestack for macBrian Anderson-20/+54
2011-12-01rt: Add FIXME's about future changes to LLVM's __morestack implBrian Anderson-0/+2
2011-11-30rt: Reorganize stack growth codeBrian Anderson-10/+8
2011-11-30rt: Remove the stack pointer field of stk_segBrian Anderson-14/+4
2011-11-30rt: Rewrite 32-bit __morestack to use the shim upcallBrian Anderson-85/+63
2011-11-29rt: Request the correct number of bytes on the C stackBrian Anderson-1/+1
2011-11-29rt: Conditionalize out the 32-bit __morestack for everything but LinuxBrian Anderson-0/+7
Currently broken everywhere else
2011-11-29rt: Fix i386/morestack.S for static linkingBrian Anderson-1/+2
2011-11-28rt: Set hidden visibility on __morestackBrian Anderson-0/+9
Each crate will have its own copy of this function, which should not be exported.
2011-11-28rt: Rename L$bail to .L$bail in i386/morestack.SBrian Anderson-2/+2
2011-11-22rt: Make __morestack build on win32Brian Anderson-1/+6
2011-11-22rt: Make __morestack (without unwinding) work on 32-bit linuxBrian Anderson-19/+25
2011-11-17rt: Make stack growth code build on LinuxBrian Anderson-1/+6
2011-11-17rt: More work on morestackPatrick Walton-21/+98
2011-11-16Revert "rt: More work on morestack"Brian Anderson-98/+21
This reverts commit 68aff2ad6d55a051e9347aa38f945d114f282691.
2011-11-16Revert "rt: Make stack growth code build on Linux"Brian Anderson-6/+1
This reverts commit da4b7da4e142a4c2119312c0e24b7c20bbe74e60.
2011-11-16rt: Make stack growth code build on LinuxBrian Anderson-1/+6
2011-11-16rt: More work on morestackPatrick Walton-21/+98