Changeset 9780
- Timestamp:
 - Feb 10, 2003, 5:05:39 PM (23 years ago)
 - Location:
 - trunk/src/kernel32
 - Files:
 - 
      
- 2 edited
 
- 
          
  exceptutil.asm (modified) (4 diffs)
 - 
          
  winexepeldr.cpp (modified) (2 diffs)
 
 
Legend:
- Unmodified
 - Added
 - Removed
 
- 
      
trunk/src/kernel32/exceptutil.asm
r9754 r9780 1 ; $Id: exceptutil.asm,v 1.2 2 2003-02-05 14:04:33sandervl Exp $1 ; $Id: exceptutil.asm,v 1.23 2003-02-10 16:05:39 sandervl Exp $ 2 2 3 3 ;/* … … 161 161 162 162 ;We're asking for problems if our stack start near a 64kb boundary 163 ;Some OS/2 thunking procedures can choke on misaligned stack addresses163 ;Some OS/2 thunking procedures can choke if there's not enough stack left 164 164 mov eax, esp 165 165 and eax, 0FFFFh … … 167 167 jge @goodthreadstack 168 168 169 ;set ESP to the top of the next 64kb block 170 add eax, 16 171 sub esp, eax 169 ;set ESP to the top of the next 64kb block and touch each 170 ;page to make sure the guard page exception handler commits 171 ;those pages 172 mov edx, esp 173 sub edx, eax 174 175 and esp, 0FFFFF000h 176 dec esp 177 178 @touchthreadstackpages: 179 mov al, byte ptr [esp] 180 181 sub esp, 1000h 182 183 cmp esp, edx 184 jg @touchthreadstackpages 185 186 mov esp, edx 187 sub esp, 16 188 172 189 @goodthreadstack: 173 190 … … 187 204 188 205 ;We're asking for problems if our stack start near a 64kb boundary 189 ;Some OS/2 thunking procedures can choke on misaligned stack addresses206 ;Some OS/2 thunking procedures can choke if there's not enough stack left 190 207 mov eax, esp 191 208 and eax, 0FFFFh 192 209 cmp eax, 0E000h 193 jge @goodstack 194 195 add eax, 1000h 196 sub esp, eax 197 @goodstack: 210 jge @goodmainstack 211 212 ;set ESP to the top of the next 64kb block and touch each 213 ;page to make sure the guard page exception handler commits 214 ;those pages 215 mov edx, esp 216 sub edx, eax 217 218 and esp, 0FFFFF000h 219 dec esp 220 221 @touchmainstackpages: 222 mov al, byte ptr [esp] 223 224 sub esp, 1000h 225 226 cmp esp, edx 227 jg @touchmainstackpages 228 229 mov esp, edx 230 sub esp, 16 231 232 @goodmainstack: 198 233 199 234 mov eax, esp  - 
      
trunk/src/kernel32/winexepeldr.cpp
r9667 r9780 1 /* $Id: winexepeldr.cpp,v 1.2 2 2003-01-13 16:51:40sandervl Exp $ */1 /* $Id: winexepeldr.cpp,v 1.23 2003-02-10 16:05:39 sandervl Exp $ */ 2 2 3 3 /* … … 182 182 ULONG Win32PeLdrExe::getDefaultStackSize() 183 183 { 184 //Note: MUST use 128kb as a minimum. Or else the workarounds for out of 185 // stack space in 16 bits code (thread entrypoint) might fail. 184 186 return (oh.SizeOfStackReserve > 128*1024) ? oh.SizeOfStackReserve : 128*1024; 185 187 }  
  Note:
 See   TracChangeset
 for help on using the changeset viewer.
  