Page MenuHomeFreeBSD

D29496.diff
No OneTemporary

D29496.diff

diff --git a/sys/amd64/amd64/vm_machdep.c b/sys/amd64/amd64/vm_machdep.c
--- a/sys/amd64/amd64/vm_machdep.c
+++ b/sys/amd64/amd64/vm_machdep.c
@@ -229,6 +229,14 @@
copy_thread(td1, td2);
+ /* Reset debug registers in the new process */
+ pcb2->pcb_dr0 = 0;
+ pcb2->pcb_dr1 = 0;
+ pcb2->pcb_dr2 = 0;
+ pcb2->pcb_dr3 = 0;
+ pcb2->pcb_dr6 = 0;
+ pcb2->pcb_dr7 = 0;
+
/* Point mdproc and then copy over p1's contents */
mdp2 = &p2->p_md;
bcopy(&p1->p_md, mdp2, sizeof(*mdp2));
diff --git a/sys/i386/i386/vm_machdep.c b/sys/i386/i386/vm_machdep.c
--- a/sys/i386/i386/vm_machdep.c
+++ b/sys/i386/i386/vm_machdep.c
@@ -241,6 +241,14 @@
copy_thread(td1, td2);
+ /* Reset debug registers in the new process */
+ pcb2->pcb_dr0 = 0;
+ pcb2->pcb_dr1 = 0;
+ pcb2->pcb_dr2 = 0;
+ pcb2->pcb_dr3 = 0;
+ pcb2->pcb_dr6 = 0;
+ pcb2->pcb_dr7 = 0;
+
/* Point mdproc and then copy over td1's contents */
mdp2 = &p2->p_md;
bcopy(&p1->p_md, mdp2, sizeof(*mdp2));

File Metadata

Mime Type
text/plain
Expires
Mon, May 18, 1:51 PM (6 h, 18 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33250950
Default Alt Text
D29496.diff (964 B)

Event Timeline