Lines Matching defs:xe
356 } XE;
360 static void init_XError ( XError* xe ) {
361 VG_(memset)(xe, 0, sizeof(*xe) );
362 xe->tag = XE_Race-1; /* bogus */
384 XError* xe = (XError*)VG_(get_error_extra)(err);
385 tl_assert(xe);
390 if (xe->tag == XE_Race) {
396 tl_assert(xe->XE.Race.thr);
397 xe->XE.Race.locksHeldW
400 xe->XE.Race.thr->locksetW,
414 tl_assert(!xe->XE.Race.hctxt);
415 tl_assert(!xe->XE.Race.descr1);
416 tl_assert(!xe->XE.Race.descr2);
425 &xe->XE.Race.hctxt, &xe->XE.Race.haddr, &xe->XE.Race.hszB,
426 xe->XE.Race.data_addr
428 tl_assert(is_heapblock == (xe->XE.Race.hctxt != NULL));
430 if (!xe->XE.Race.hctxt) {
434 xe->XE.Race.descr1
437 xe->XE.Race.descr2
441 (void) VG_(get_data_description)( xe->XE.Race.descr1,
442 xe->XE.Race.descr2,
443 xe->XE.Race.data_addr );
451 if (0 == VG_(strlen)( VG_(indexXA)( xe->XE.Race.descr1, 0 ))) {
452 VG_(deleteXA)( xe->XE.Race.descr1 );
453 xe->XE
455 if (0 == VG_(strlen)( VG_(indexXA)( xe->XE.Race.descr2, 0 ))) {
456 VG_(deleteXA)( xe->XE.Race.descr2 );
457 xe->XE.Race.descr2 = NULL;
467 Addr acc_addr = xe->XE.Race.data_addr;
468 Int acc_szB = xe->XE.Race.szB;
469 Thr* acc_thr = xe->XE.Race.thr->hbthr;
470 Bool acc_isW = xe->XE.Race.isWrite;
474 tl_assert(!xe->XE.Race.h2_ct_accEC);
475 tl_assert(!xe->XE.Race.h2_ct);
484 xe->XE.Race.h2_ct_accEC = wherep;
485 xe->XE.Race.h2_ct = threadp;
486 xe->XE.Race.h2_ct_accSzB = (Int)conf_szB;
487 xe->XE.Race.h2_ct_accIsW = conf_isW;
488 xe->XE.Race.h2_ct_locksHeldW
498 tl_assert( (!!xe->XE.Race.h2_ct) == (!!xe->XE.Race.h2_ct_accEC) );
510 XError xe;
530 init_XError(&xe);
531 xe.tag = XE_Race;
532 xe.XE.Race.data_addr = data_addr;
533 xe.XE.Race.szB = szB;
534 xe.XE.Race.isWrite = isWrite;
535 xe.XE.Race.thr = thr;
541 tl_assert(xe.XE.Race.descr1 == NULL);
542 tl_assert(xe.XE.Race.descr2 == NULL);
549 xe.XE.Race.h2_ct_accSzB = 0;
550 xe.XE.Race.h2_ct_accIsW = False;
551 xe.XE.Race.h2_ct_accEC = NULL;
552 xe.XE.Race.h2_ct = NULL;
556 xe.XE.Race.h1_ct = h1_ct;
557 xe.XE.Race.h1_ct_mbsegstartEC = h1_ct_segstart;
558 xe.XE.Race.h1_ct_mbsegendEC = h1_ct_mbsegendEC;
561 XE_Race, data_addr, NULL, &xe );
566 XError xe;
569 init_XError(&xe);
570 xe.tag = XE_UnlockUnlocked;
571 xe.XE.UnlockUnlocked.thr
573 xe.XE.UnlockUnlocked.lock
579 XE_UnlockUnlocked, 0, NULL, &xe );
585 XError xe;
589 init_XError(&xe);
590 xe.tag = XE_UnlockForeign;
591 xe.XE.UnlockForeign.thr = thr;
592 xe.XE.UnlockForeign.owner = owner;
593 xe.XE.UnlockForeign.lock
599 XE_UnlockForeign, 0, NULL, &xe );
604 XError xe;
606 init_XError(&xe);
607 xe.tag = XE_UnlockBogus;
608 xe.XE.UnlockBogus.thr = thr;
609 xe.XE.UnlockBogus.lock_ga = lock_ga;
614 XE_UnlockBogus, 0, NULL, &xe );
626 XError xe;
629 init_XError(&xe);
630 xe.tag = XE_LockOrder;
631 xe.XE.LockOrder.thr = thr;
632 xe.XE.LockOrder.shouldbe_earlier_ga = shouldbe_earlier_ga;
633 xe.XE.LockOrder.shouldbe_earlier_ec = shouldbe_earlier_ec;
634 xe.XE.LockOrder.shouldbe_later_ga = shouldbe_later_ga;
635 xe.XE.LockOrder.shouldbe_later_ec = shouldbe_later_ec;
636 xe.XE.LockOrder.actual_earlier_ec = actual_earlier_ec;
641 XE_LockOrder, 0, NULL, &xe );
647 XError xe;
651 init_XError(&xe);
652 xe.tag = XE_PthAPIerror;
653 xe.XE.PthAPIerror.thr = thr;
654 xe.XE.PthAPIerror.fnname = string_table_strdup(fnname);
655 xe.XE.PthAPIerror.err = err;
656 xe.XE.PthAPIerror.errstr = string_table_strdup(errstr);
661 XE_PthAPIerror, 0, NULL, &xe );
667 XError xe;
670 init_XError(&xe);
671 xe.tag = XE_Misc;
672 xe.XE.Misc.thr = thr;
673 xe.XE.Misc.errstr = string_table_strdup(errstr);
674 xe.XE.Misc.auxstr = auxstr ? string_table_strdup(auxstr) : NULL;
675 xe.XE.Misc.auxctx = auxctx;
680 XE_Misc, 0, NULL, &xe );
701 return xe1->XE.Race.szB == xe2->XE.Race.szB
702 && xe1->XE.Race.isWrite == xe2->XE.Race.isWrite
704 ? xe1->XE.Race.data_addr == xe2->XE.Race.data_addr
707 return xe1->XE.UnlockUnlocked.thr == xe2->XE.UnlockUnlocked.thr
708 && xe1->XE.UnlockUnlocked.lock == xe2->XE.UnlockUnlocked.lock;
710 return xe1->XE.UnlockForeign.thr == xe2->XE.UnlockForeign.thr
711 && xe1->XE.UnlockForeign.owner == xe2->XE.UnlockForeign.owner
712 && xe1->XE.UnlockForeign.lock == xe2->XE.UnlockForeign.lock;
714 return xe1->XE.UnlockBogus.thr == xe2->XE.UnlockBogus.thr
715 && xe1->XE.UnlockBogus.lock_ga == xe2->XE.UnlockBogus.lock_ga;
717 return xe1->XE.PthAPIerror.thr == xe2->XE.PthAPIerror.thr
718 && 0==VG_(strcmp)(xe1->XE.PthAPIerror.fnname,
719 xe2->XE.PthAPIerror.fnname)
720 && xe1->XE.PthAPIerror.err == xe2->XE.PthAPIerror.err;
722 return xe1->XE.LockOrder.thr == xe2->XE.LockOrder.thr;
724 return xe1->XE.Misc.thr == xe2->XE.Misc.thr
725 && 0==VG_(strcmp)(xe1->XE.Misc.errstr, xe2->XE.Misc.errstr);
888 XError* xe;
890 xe = (XError*)VG_(get_error_extra)(err);
891 tl_assert(xe);
895 announce_one_thread( xe->XE.Misc.thr );
898 announce_one_thread( xe->XE.LockOrder.thr );
901 announce_one_thread( xe->XE.PthAPIerror.thr );
904 announce_one_thread( xe->XE.UnlockBogus.thr );
907 announce_one_thread( xe->XE.UnlockForeign.thr );
908 announce_one_thread( xe->XE.UnlockForeign.owner );
911 announce_one_thread( xe->XE.UnlockUnlocked.thr );
914 announce_one_thread( xe->XE.Race.thr );
915 if (xe->XE.Race.h2_ct)
916 announce_one_thread( xe->XE.Race.h2_ct );
917 if (xe->XE.Race.h1_ct)
918 announce_one_thread( xe->XE.Race.h1_ct );
935 XError *xe = (XError*)VG_(get_error_extra)(err);
936 tl_assert(xe);
944 tl_assert( HG_(is_sane_Thread)( xe->XE
950 (Int)xe->XE.Misc.thr->errmsg_index,
951 xe->XE.Misc.errstr );
953 (Int)xe->XE.Misc.thr->errmsg_index );
956 if (xe->XE.Misc.auxstr) {
957 emit(" <auxwhat>%s</auxwhat>\n", xe->XE.Misc.auxstr);
958 if (xe->XE.Misc.auxctx)
959 VG_(pp_ExeContext)( xe->XE.Misc.auxctx );
965 (Int)xe->XE.Misc.thr->errmsg_index,
966 xe->XE.Misc.errstr );
968 if (xe->XE.Misc.auxstr) {
969 emit(" %s\n", xe->XE.Misc.auxstr);
970 if (xe->XE.Misc.auxctx)
971 VG_(pp_ExeContext)( xe->XE.Misc.auxctx );
979 tl_assert( HG_(is_sane_Thread)( xe->XE.LockOrder.thr ) );
986 (Int)xe->XE.LockOrder.thr->errmsg_index,
987 (void*)xe->XE.LockOrder.shouldbe_earlier_ga,
988 (void*)xe->XE.LockOrder.shouldbe_later_ga );
990 (Int)xe->XE.LockOrder.thr->errmsg_index );
993 if (xe->XE.LockOrder.shouldbe_earlier_ec
994 && xe->XE.LockOrder.shouldbe_later_ec) {
997 (void*)xe->XE.LockOrder.shouldbe_earlier_ga );
998 VG_(pp_ExeContext)( xe->XE.LockOrder.shouldbe_earlier_ec );
1001 (void*)xe->XE.LockOrder.shouldbe_later_ga );
1002 VG_(pp_ExeContext)( xe->XE.LockOrder.shouldbe_later_ec );
1008 (Int)xe->XE.LockOrder.thr->errmsg_index,
1009 (void*)xe->XE.LockOrder.shouldbe_earlier_ga,
1010 (void*)xe->XE.LockOrder.shouldbe_later_ga );
1014 (void*)xe->XE.LockOrder.shouldbe_later_ga);
1015 if (xe->XE.LockOrder.actual_earlier_ec) {
1016 VG_(pp_ExeContext)(xe->XE.LockOrder.actual_earlier_ec);
1022 (void*)xe->XE.LockOrder.shouldbe_earlier_ga);
1024 if (xe->XE.LockOrder.shouldbe_earlier_ec
1025 && xe->XE.LockOrder.shouldbe_later_ec) {
1029 (void*)xe->XE.LockOrder.shouldbe_earlier_ga );
1030 VG_(pp_ExeContext)( xe->XE.LockOrder.shouldbe_earlier_ec );
1033 (void*)xe->XE.LockOrder.shouldbe_later_ga );
1034 VG_(pp_ExeContext)( xe->XE.LockOrder.shouldbe_later_ec );
1043 tl_assert( HG_(is_sane_Thread)( xe->XE.PthAPIerror.thr ) );
1050 (Int)xe->XE.PthAPIerror.thr->errmsg_index,
1051 xe->XE.PthAPIerror.fnname );
1053 (Int)xe->XE.PthAPIerror.thr->errmsg_index );
1056 xe->XE.PthAPIerror.err, xe->XE.PthAPIerror.errstr );
1062 (Int)xe->XE.PthAPIerror.thr->errmsg_index,
1063 xe->XE.PthAPIerror.fnname );
1065 xe->XE.PthAPIerror.err, xe->XE.PthAPIerror.errstr );
1074 tl_assert( HG_(is_sane_Thread)( xe->XE.UnlockBogus.thr ) );
1081 (Int)xe->XE.UnlockBogus.thr->errmsg_index,
1082 (void*)xe->XE.UnlockBogus.lock_ga );
1084 (Int)xe->XE.UnlockBogus.thr->errmsg_index );
1091 (Int)xe->XE.UnlockBogus.thr->errmsg_index,
1092 (void*)xe->XE.UnlockBogus.lock_ga );
1101 tl_assert( HG_(is_sane_LockP)( xe->XE.UnlockForeign.lock ) );
1102 tl_assert( HG_(is_sane_Thread)( xe->XE.UnlockForeign.owner ) );
1103 tl_assert( HG_(is_sane_Thread)( xe->XE.UnlockForeign.thr ) );
1110 (Int)xe->XE.UnlockForeign.thr->errmsg_index,
1111 (void*)xe->XE.UnlockForeign.lock->guestaddr,
1112 (Int)xe->XE.UnlockForeign.owner->errmsg_index );
1114 (Int)xe->XE.UnlockForeign.thr->errmsg_index );
1116 (Int)xe->XE.UnlockForeign.owner->errmsg_index );
1120 if (xe->XE.UnlockForeign.lock->appeared_at) {
1122 (void*)xe->XE.UnlockForeign.lock->guestaddr );
1123 VG_(pp_ExeContext)( xe->XE.UnlockForeign.lock->appeared_at );
1130 (Int)xe->XE.UnlockForeign.thr->errmsg_index,
1131 (void*)xe->XE.UnlockForeign.lock->guestaddr,
1132 (Int)xe->XE.UnlockForeign.owner->errmsg_index );
1134 if (xe->XE.UnlockForeign.lock->appeared_at) {
1136 (void*)xe->XE.UnlockForeign.lock->guestaddr );
1137 VG_(pp_ExeContext)( xe->XE.UnlockForeign.lock->appeared_at );
1146 tl_assert( HG_(is_sane_LockP)( xe->XE.UnlockUnlocked.lock ) );
1147 tl_assert( HG_(is_sane_Thread)( xe->XE.UnlockUnlocked.thr ) );
1154 (Int)xe->XE.UnlockUnlocked.thr->errmsg_index,
1155 (void*)xe->XE.UnlockUnlocked.lock->guestaddr );
1157 (Int)xe->XE.UnlockUnlocked.thr->errmsg_index );
1160 if (xe->XE.UnlockUnlocked.lock->appeared_at) {
1162 (void*)xe->XE.UnlockUnlocked.lock->guestaddr );
1163 VG_(pp_ExeContext)( xe->XE.UnlockUnlocked.lock->appeared_at );
1169 (Int)xe->XE.UnlockUnlocked.thr->errmsg_index,
1170 (void*)xe->XE.UnlockUnlocked.lock->guestaddr );
1172 if (xe->XE.UnlockUnlocked.lock->appeared_at) {
1174 (void*)xe->XE.UnlockUnlocked.lock->guestaddr );
1175 VG_(pp_ExeContext)( xe->XE.UnlockUnlocked.lock->appeared_at );
1187 what = xe->XE.Race.isWrite ? "write" : "read";
1188 szB = xe->XE.Race.szB;
1191 tl_assert( HG_(is_sane_Thread)( xe->XE.Race.thr ));
1192 if (xe->XE.Race.h2_ct)
1193 tl_assert( HG_(is_sane_Thread)( xe->XE.Race.h2_ct ));
1201 what, szB, (void*)err_ga, (Int)xe->XE.Race.thr->errmsg_index );
1203 (Int)xe->XE.Race.thr->errmsg_index );
1207 if (xe->XE.Race.h2_ct) {
1208 tl_assert(xe->XE.Race.h2_ct_accEC); // assured by update_extra
1212 xe->XE.Race.h2_ct_accIsW ? "write" : "read",
1213 xe->XE.Race.h2_ct_accSzB,
1214 xe->XE.Race.h2_ct->errmsg_index );
1216 xe->XE.Race.h2_ct->errmsg_index);
1218 VG_(pp_ExeContext)( xe->XE.Race.h2_ct_accEC );
1221 if (xe->XE.Race.h1_ct) {
1225 xe->XE.Race.h1_ct->errmsg_index );
1227 xe->XE.Race.h1_ct->errmsg_index );
1229 if (xe->XE.Race.h1_ct_mbsegstartEC) {
1230 VG_(pp_ExeContext)( xe->XE.Race.h1_ct_mbsegstartEC );
1235 if (xe->XE.Race.h1_ct_mbsegendEC) {
1236 VG_(pp_ExeContext)( xe->XE.Race.h1_ct_mbsegendEC );
1245 announce_combined_LockP_vecs( xe->XE.Race.locksHeldW,
1246 xe->XE.Race.h2_ct_locksHeldW );
1250 what, szB, (void*)err_ga, (Int)xe->XE.Race.thr->errmsg_index );
1252 tl_assert(xe->XE.Race.locksHeldW);
1253 show_LockP_summary_textmode( xe->XE.Race.locksHeldW, "" );
1256 if (xe->XE.Race.h2_ct) {
1257 tl_assert(xe->XE.Race.h2_ct_accEC); // assured by update_extra
1258 tl_assert(xe->XE.Race.h2_ct_locksHeldW);
1262 xe->XE.Race.h2_ct_accIsW ? "write" : "read",
1263 xe->XE.Race.h2_ct_accSzB,
1264 xe->XE.Race.h2_ct->errmsg_index );
1265 show_LockP_summary_textmode( xe->XE.Race.h2_ct_locksHeldW, "" );
1266 VG_(pp_ExeContext)( xe->XE.Race.h2_ct_accEC );
1269 if (xe->XE.Race.h1_ct) {
1272 xe->XE.Race.h1_ct->errmsg_index );
1273 if (xe->XE.Race.h1_ct_mbsegstartEC) {
1274 VG_(pp_ExeContext)( xe->XE.Race.h1_ct_mbsegstartEC );
1279 if (xe->XE.Race.h1_ct_mbsegendEC) {
1280 VG_(pp_ExeContext)( xe->XE.Race.h1_ct_mbsegendEC );
1290 if (xe->XE.Race.hctxt) {
1291 SizeT delta = err_ga - xe->XE.Race.haddr;
1295 xe->XE.Race.hszB);
1296 VG_(pp_ExeContext)( xe->XE.Race.hctxt );
1301 xe->XE.Race.hszB);
1302 VG_(pp_ExeContext)( xe->XE.Race.hctxt );
1311 if (xe->XE.Race.descr1)
1313 (HChar*)VG_(indexXA)( xe->XE.Race.descr1, 0 ) );
1314 if (xe->XE.Race.descr2)
1316 (HChar*)VG_(indexXA)( xe->XE.Race.descr2, 0 ) );
1318 if (xe->XE.Race.descr1 || xe->XE.Race.descr2)
1320 if (xe->XE.Race.descr1)
1322 (HChar*)VG_(indexXA)( xe->XE.Race.descr1, 0 ) );
1323 if (xe->XE.Race.descr2)
1325 (HChar*)VG_(indexXA)( xe->XE.Race.descr2, 0 ) );