|
From: <sv...@va...> - 2006-01-13 13:04:10
|
Author: sewardj
Date: 2006-01-13 13:04:03 +0000 (Fri, 13 Jan 2006)
New Revision: 5526
Log:
Fix bogus assertions.
Modified:
trunk/coregrind/m_scheduler/scheduler.c
Modified: trunk/coregrind/m_scheduler/scheduler.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_scheduler/scheduler.c 2006-01-13 09:57:01 UTC (rev =
5525)
+++ trunk/coregrind/m_scheduler/scheduler.c 2006-01-13 13:04:03 UTC (rev =
5526)
@@ -611,10 +611,23 @@
been used immediately before, on this same thread. */
# endif
=20
+ /* There can be 3 outcomes from VG_(run_a_noredir_translation):
+
+ - a signal occurred and the sighandler longjmp'd. Then both [2]
+ and [3] are unchanged - hence zero.
+
+ - translation ran normally, set [2] (next guest IP) and set [3]
+ to whatever [1] was beforehand, indicating a normal (boring)
+ jump to the next block.
+
+ - translation ran normally, set [2] (next guest IP) and set [3]
+ to something different from [1] beforehand, which indicates a
+ TRC_ value.
+ */
argblock[0] =3D (UWord)hcode;
argblock[1] =3D (UWord)&VG_(threads)[tid].arch.vex;
- argblock[2] =3D 0;
- argblock[3] =3D 0;
+ argblock[2] =3D 0; /* next guest IP is written here */
+ argblock[3] =3D 0; /* guest state ptr afterwards is written here */
=20
vg_assert(VG_(in_generated_code) =3D=3D False);
VG_(in_generated_code) =3D True;
@@ -630,7 +643,8 @@
if (jumped) {
/* We get here if the client took a fault that caused our signal
handler to longjmp. */
- vg_assert(argblock[3] =3D=3D argblock[1]); /* iow, trc was not set=
*/
+ vg_assert(argblock[2] =3D=3D 0); /* next guest IP was not written =
*/
+ vg_assert(argblock[3] =3D=3D 0); /* trc was not written */
block_signals(tid);
return VG_TRC_FAULT_SIGNAL;
} else {
|