File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -122,6 +122,7 @@ static int stress_bad_altstack_child(stress_args_t *args)
122122 struct rlimit rlim ;
123123#endif
124124 void * func_ptr = (void * )stress_stack_sigalt_no_check ;
125+ void * last_page = (void * )~(uintptr_t )(args -> page_size - 1 );
125126
126127 if (sigsetjmp (jmp_env , 1 ) != 0 ) {
127128 /*
@@ -203,7 +204,7 @@ static int stress_bad_altstack_child(stress_args_t *args)
203204retry :
204205 if (UNLIKELY (!stress_continue (args )))
205206 return EXIT_SUCCESS ;
206- rnd = stress_mwc32modn (11 );
207+ rnd = stress_mwc32modn (12 );
207208 switch (rnd ) {
208209#if defined(HAVE_MPROTECT )
209210 case 1 :
@@ -288,6 +289,10 @@ static int stress_bad_altstack_child(stress_args_t *args)
288289 }
289290#endif
290291 goto retry ;
292+ case 11 :
293+ /* Illegal last page */
294+ stress_bad_altstack_force_fault (last_page );
295+ goto retry ;
291296 default :
292297 case 0 :
293298 /* Illegal unmapped stack */
You can’t perform that action at this time.
0 commit comments