Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
2e30f6ff
Commit
2e30f6ff
authored
Oct 11, 1998
by
Ulrich Weigand
Committed by
Alexandre Julliard
Oct 11, 1998
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use emergency TEB selector to avoid debugger crashes when stepping
through relay stubs (or when FS is invalid otherwise).
parent
72dcd5c8
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
2 deletions
+12
-2
sig_context.h
include/sig_context.h
+4
-2
syslevel.h
include/syslevel.h
+1
-0
process.c
scheduler/process.c
+4
-0
syslevel.c
scheduler/syslevel.c
+3
-0
No files found.
include/sig_context.h
View file @
2e30f6ff
...
...
@@ -219,8 +219,10 @@ typedef struct _CONTEXT /* Note 1 */
#ifdef FS_sig
#include "syslevel.h"
#define HANDLER_INIT() \
SET_FS(IS_SELECTOR_SYSTEM(CS_sig(HANDLER_CONTEXT)) ? \
FS_sig(HANDLER_CONTEXT) : SYSLEVEL_Win16CurrentTeb)
do { int fs = IS_SELECTOR_SYSTEM(CS_sig(HANDLER_CONTEXT)) ? \
FS_sig(HANDLER_CONTEXT) : SYSLEVEL_Win16CurrentTeb; \
if (!fs) fs = SYSLEVEL_EmergencyTeb; \
SET_FS(fs); } while (0)
#else
#define HANDLER_INIT()
/* nothing */
#endif
...
...
include/syslevel.h
View file @
2e30f6ff
...
...
@@ -11,6 +11,7 @@
#include "winbase.h"
extern
WORD
SYSLEVEL_Win16CurrentTeb
;
extern
WORD
SYSLEVEL_EmergencyTeb
;
void
SYSLEVEL_Init
(
void
);
VOID
SYSLEVEL_EnterWin16Lock
(
VOID
);
...
...
scheduler/process.c
View file @
2e30f6ff
...
...
@@ -15,6 +15,7 @@
#include "heap.h"
#include "task.h"
#include "ldt.h"
#include "syslevel.h"
#include "thread.h"
#include "winerror.h"
#include "pe_image.h"
...
...
@@ -237,6 +238,9 @@ BOOL32 PROCESS_Init(void)
if
(
!
(
thdb
=
THREAD_Create
(
pdb
,
0
,
FALSE
,
NULL
,
NULL
,
NULL
,
NULL
)))
return
FALSE
;
thdb
->
unix_pid
=
getpid
();
/* Remember TEB selector of initial process for emergency use */
SYSLEVEL_EmergencyTeb
=
thdb
->
teb_sel
;
/* Create the environment DB of the first process */
if
(
!
PROCESS_BuildEnvDB
(
pdb
))
return
FALSE
;
...
...
scheduler/syslevel.c
View file @
2e30f6ff
...
...
@@ -16,6 +16,9 @@ static SEGPTR segpWin16Mutex;
/* Global variable to save current TEB while in 16-bit code */
WORD
SYSLEVEL_Win16CurrentTeb
=
0
;
/* TEB of initial process for emergency use */
WORD
SYSLEVEL_EmergencyTeb
=
0
;
/************************************************************************
* SYSLEVEL_Init
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment