File tree 8 files changed +0
-42
lines changed
8 files changed +0
-42
lines changed Original file line number Diff line number Diff line change 25
25
#![ feature( rustc_diagnostic_macros) ]
26
26
#![ feature( slice_sort_by_cached_key) ]
27
27
#![ feature( set_stdio) ]
28
- #![ feature( rustc_stack_internals) ]
29
28
#![ feature( no_debug) ]
30
29
31
30
#![ recursion_limit="256" ]
Original file line number Diff line number Diff line change @@ -73,18 +73,3 @@ fn lang_start<T: ::process::Termination + 'static>
73
73
{
74
74
lang_start_internal ( & move || main ( ) . report ( ) , argc, argv)
75
75
}
76
-
77
- /// Function used for reverting changes to the main stack before setrlimit().
78
- /// This is POSIX (non-Linux) specific and unlikely to be directly stabilized.
79
- #[ unstable( feature = "rustc_stack_internals" , issue = "0" ) ]
80
- pub unsafe fn deinit_stack_guard ( ) {
81
- :: sys:: thread:: guard:: deinit ( ) ;
82
- }
83
-
84
- /// Function used for resetting the main stack guard address after setrlimit().
85
- /// This is POSIX specific and unlikely to be directly stabilized.
86
- #[ unstable( feature = "rustc_stack_internals" , issue = "0" ) ]
87
- pub unsafe fn update_stack_guard ( ) {
88
- let main_guard = :: sys:: thread:: guard:: init ( ) ;
89
- :: sys_common:: thread_info:: reset_guard ( main_guard) ;
90
- }
Original file line number Diff line number Diff line change @@ -119,7 +119,6 @@ pub mod guard {
119
119
pub unsafe fn init ( ) -> Option < Guard > {
120
120
None
121
121
}
122
- pub unsafe fn deinit ( ) { }
123
122
}
124
123
125
124
fn min_stack_size ( _: * const libc:: pthread_attr_t ) -> usize {
Original file line number Diff line number Diff line change @@ -92,5 +92,4 @@ pub mod guard {
92
92
pub type Guard = !;
93
93
pub unsafe fn current ( ) -> Option < Guard > { None }
94
94
pub unsafe fn init ( ) -> Option < Guard > { None }
95
- pub unsafe fn deinit ( ) { }
96
95
}
Original file line number Diff line number Diff line change @@ -97,5 +97,4 @@ pub mod guard {
97
97
pub type Guard = !;
98
98
pub unsafe fn current ( ) -> Option < Guard > { None }
99
99
pub unsafe fn init ( ) -> Option < Guard > { None }
100
- pub unsafe fn deinit ( ) { }
101
100
}
Original file line number Diff line number Diff line change @@ -211,7 +211,6 @@ pub mod guard {
211
211
pub type Guard = Range < usize > ;
212
212
pub unsafe fn current ( ) -> Option < Guard > { None }
213
213
pub unsafe fn init ( ) -> Option < Guard > { None }
214
- pub unsafe fn deinit ( ) { }
215
214
}
216
215
217
216
@@ -355,26 +354,6 @@ pub mod guard {
355
354
}
356
355
}
357
356
358
- pub unsafe fn deinit ( ) {
359
- if !cfg ! ( target_os = "linux" ) {
360
- if let Some ( stackaddr) = get_stack_start_aligned ( ) {
361
- // Remove the protection on the guard page.
362
- // FIXME: we cannot unmap the page, because when we mmap()
363
- // above it may be already mapped by the OS, which we can't
364
- // detect from mmap()'s return value. If we unmap this page,
365
- // it will lead to failure growing stack size on platforms like
366
- // macOS. Instead, just restore the page to a writable state.
367
- // This ain't Linux, so we probably don't need to care about
368
- // execstack.
369
- let result = mprotect ( stackaddr, PAGE_SIZE , PROT_READ | PROT_WRITE ) ;
370
-
371
- if result != 0 {
372
- panic ! ( "unable to reset the guard page" ) ;
373
- }
374
- }
375
- }
376
- }
377
-
378
357
#[ cfg( any( target_os = "macos" ,
379
358
target_os = "bitrig" ,
380
359
target_os = "openbsd" ,
Original file line number Diff line number Diff line change @@ -68,7 +68,6 @@ pub mod guard {
68
68
pub type Guard = !;
69
69
pub unsafe fn current ( ) -> Option < Guard > { None }
70
70
pub unsafe fn init ( ) -> Option < Guard > { None }
71
- pub unsafe fn deinit ( ) { }
72
71
}
73
72
74
73
cfg_if ! {
Original file line number Diff line number Diff line change @@ -98,5 +98,4 @@ pub mod guard {
98
98
pub type Guard = !;
99
99
pub unsafe fn current ( ) -> Option < Guard > { None }
100
100
pub unsafe fn init ( ) -> Option < Guard > { None }
101
- pub unsafe fn deinit ( ) { }
102
101
}
You can’t perform that action at this time.
0 commit comments