Changeset 21999 for trunk/testapp/exceptions
- Timestamp:
- Apr 18, 2012, 10:46:37 PM (13 years ago)
- Location:
- trunk/testapp/exceptions
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/testapp/exceptions/GuardPages/main.cpp
r21982 r21999 149 149 /////////////////////////////////////////////////// 150 150 151 #if 1 152 151 153 printf ("\nTEST 1 (STACK)\n"); 152 154 … … 154 156 DWORD dwYellowZoneSize = sSysInfo.dwPageSize * 3; 155 157 156 #if 1157 158 if (VirtualAlloc ((LPVOID) dwStackBase, dwYellowZoneSize, 158 159 MEM_COMMIT, PAGE_READWRITE)) … … 186 187 } 187 188 } 188 #endif189 189 190 190 PrintMemLayout (&dwStackTop); 191 191 192 #endif 193 192 194 /////////////////////////////////////////////////// 195 196 #if 1 193 197 194 198 printf ("\nTEST 2 (PAGE_GUARD)\n"); … … 220 224 VirtualFree (pNonStack, 0, MEM_RELEASE); 221 225 226 #endif 227 222 228 return 0; 223 229 } … … 226 232 { 227 233 #ifdef __WIN32OS2__ 228 EnableSEH(); 234 #ifdef ODIN_FORCE_WIN32_TIB 235 ForceWin32TIB(); 236 #endif 229 237 #endif 230 238 -
trunk/testapp/exceptions/seh/crash.c
r21663 r21999 24 24 _argc = argc; 25 25 _argv = argv; 26 EnableSEH(); 26 #ifdef ODIN_FORCE_WIN32_TIB 27 ForceWin32TIB(); 28 #endif 27 29 RegisterLxExe(WinMain, NULL); 28 30 } … … 87 89 void foo(int code) 88 90 { 89 __try90 {91 printf("In foo(%d)...\n", code);91 __try 92 { 93 printf("In foo(%d)...\n", code); 92 94 93 if (code == 2)94 {95 throw_EXCEPTION_INT_DIVIDE_BY_ZERO();96 printf("FAILED: No exception!\n");97 }98 else99 {100 foo(code + 1);101 }102 }103 __except(exc_filter(exception_info()))104 {105 printf("FAILED: foo(%d) exception handled.\n", code);106 }95 if (code == 2) 96 { 97 throw_EXCEPTION_INT_DIVIDE_BY_ZERO(); 98 printf("FAILED: No exception!\n"); 99 } 100 else 101 { 102 foo(code + 1); 103 } 104 } 105 __except(exc_filter(exception_info())) 106 { 107 printf("FAILED: foo(%d) exception handled.\n", code); 108 } 107 109 } 108 110 … … 118 120 { 119 121 printf("The program should now expectedly crash " 120 "( but NO POPUPLOG.OS2 entry!)...\n");122 "(and may be a NO POPUPLOG.OS2 entry)...\n"); 121 123 122 124 HANDLE hThread = CreateThread(NULL, 0, ThreadProc, NULL, 0, NULL); -
trunk/testapp/exceptions/seh/except.c
r21476 r21999 23 23 _argc = argc; 24 24 _argv = argv; 25 EnableSEH(); 25 #ifdef ODIN_FORCE_WIN32_TIB 26 ForceWin32TIB(); 27 #endif 26 28 RegisterLxExe(WinMain, NULL); 27 29 } -
trunk/testapp/exceptions/seh/finally.c
r21449 r21999 23 23 _argc = argc; 24 24 _argv = argv; 25 EnableSEH(); 25 #ifdef ODIN_FORCE_WIN32_TIB 26 ForceWin32TIB(); 27 #endif 26 28 RegisterLxExe(WinMain, NULL); 27 29 } -
trunk/testapp/exceptions/seh/longjmp.c
r21662 r21999 24 24 _argc = argc; 25 25 _argv = argv; 26 EnableSEH(); 26 #ifdef ODIN_FORCE_WIN32_TIB 27 ForceWin32TIB(); 28 #endif 27 29 RegisterLxExe(WinMain, NULL); 28 30 }
Note:
See TracChangeset
for help on using the changeset viewer.