File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change 5252// Our goal here is to touch each page between %rsp+8 and %rsp+8-%rax,
5353// ensuring that if any pages are unmapped we'll make a page fault.
5454//
55+ // This function is unsafe because it uses a custom ABI, it does not actually match `extern "C"`.
56+ //
5557// The ABI here is that the stack frame size is located in `%rax`. Upon
5658// return we're not supposed to modify `%rsp` or `%rax`.
5759#[ cfg( target_arch = "x86_64" ) ]
@@ -141,6 +143,8 @@ pub unsafe extern "C" fn __rust_probestack() {
141143// that on Unix we're expected to restore everything as it was, this
142144// function basically can't tamper with anything.
143145//
146+ // This function is unsafe because it uses a custom ABI, it does not actually match `extern "C"`.
147+ //
144148// The ABI here is the same as x86_64, except everything is 32-bits large.
145149#[ unsafe( naked) ]
146150#[ no_mangle]
@@ -186,6 +190,8 @@ pub unsafe extern "C" fn __rust_probestack() {
186190// probestack function will also do things like _chkstk in MSVC.
187191// So we need to sub %ax %sp in probestack when arch is x86.
188192//
193+ // This function is unsafe because it uses a custom ABI, it does not actually match `extern "C"`.
194+ //
189195// REF: Rust commit(74e80468347)
190196// rust\src\llvm-project\llvm\lib\Target\X86\X86FrameLowering.cpp: 805
191197// Comments in LLVM:
You can’t perform that action at this time.
0 commit comments