PERFORCE change 168156 for review

Stanislav Sedov stas at FreeBSD.org
Fri Sep 4 14:05:12 UTC 2009


http://perforce.freebsd.org/chv.cgi?CH=168156

Change 168156 by stas at stas_yandex on 2009/09/04 14:05:11

	- siguc might be passed as NULL by valgrind, handle that in the manner
	         linux wrapper does this.

Affected files ...

.. //depot/projects/valgrind/coregrind/m_sigframe/sigframe-amd64-freebsd.c#7 edit
.. //depot/projects/valgrind/coregrind/m_sigframe/sigframe-x86-freebsd.c#7 edit

Differences ...

==== //depot/projects/valgrind/coregrind/m_sigframe/sigframe-amd64-freebsd.c#7 (text+ko) ====

@@ -267,8 +267,13 @@
       frame->psigInfo = (Addr)&frame->sigInfo;
    VG_(memcpy)(&frame->sigInfo, siginfo, sizeof(vki_siginfo_t));
 
-   trapno = siguc->uc_mcontext.trapno;
-   err = siguc->uc_mcontext.err;
+   if (siguc != NULL) {
+      trapno = siguc->uc_mcontext.trapno;
+      err = siguc->uc_mcontext.err;
+   } else {
+      trapno = 0;
+      err = 0;
+   }
 
    synth_ucontext(tst->tid, siginfo, trapno, err, mask,
                   &frame->uContext, &frame->fpstate);

==== //depot/projects/valgrind/coregrind/m_sigframe/sigframe-x86-freebsd.c#7 (text+ko) ====

@@ -266,8 +266,13 @@
       frame->psigInfo = (Addr)&frame->sigInfo;
    VG_(memcpy)(&frame->sigInfo, siginfo, sizeof(vki_siginfo_t));
 
-   trapno = siguc->uc_mcontext.trapno;
-   err = siguc->uc_mcontext.err;
+   if (siguc != NULL) {
+      trapno = siguc->uc_mcontext.trapno;
+      err = siguc->uc_mcontext.err;
+   } else {
+      trapno = 0;
+      err = 0;
+   }
 
    synth_ucontext(tst->tid, siginfo, trapno, err, mask,
                   &frame->uContext, &frame->fpstate);


More information about the p4-projects mailing list