You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
1.5 KiB

  1. --- a/libitm/beginend.cc
  2. +++ b/libitm/beginend.cc
  3. @@ -431,7 +431,7 @@ GTM::gtm_transaction_cp::save(gtm_thread
  4. // Save everything that we might have to restore on restarts or aborts.
  5. jb = tx->jb;
  6. undolog_size = tx->undolog.size();
  7. - memcpy(&alloc_actions, &tx->alloc_actions, sizeof(alloc_actions));
  8. + alloc_actions = tx->alloc_actions;
  9. user_actions_size = tx->user_actions.size();
  10. id = tx->id;
  11. prop = tx->prop;
  12. @@ -449,7 +449,7 @@ GTM::gtm_transaction_cp::commit(gtm_thre
  13. // commits of nested transactions. Allocation actions must be committed
  14. // before committing the snapshot.
  15. tx->jb = jb;
  16. - memcpy(&tx->alloc_actions, &alloc_actions, sizeof(alloc_actions));
  17. + tx->alloc_actions = alloc_actions;
  18. tx->id = id;
  19. tx->prop = prop;
  20. }
  21. @@ -485,7 +485,7 @@ GTM::gtm_thread::rollback (gtm_transacti
  22. prop = cp->prop;
  23. if (cp->disp != abi_disp())
  24. set_abi_disp(cp->disp);
  25. - memcpy(&alloc_actions, &cp->alloc_actions, sizeof(alloc_actions));
  26. + alloc_actions = cp->alloc_actions;
  27. nesting = cp->nesting;
  28. }
  29. else
  30. --- a/libitm/method-ml.cc
  31. +++ b/libitm/method-ml.cc
  32. @@ -138,7 +138,9 @@ struct ml_mg : public method_group
  33. // This store is only executed while holding the serial lock, so relaxed
  34. // memory order is sufficient here. Same holds for the memset.
  35. time.store(0, memory_order_relaxed);
  36. - memset(orecs, 0, sizeof(atomic<gtm_word>) * L2O_ORECS);
  37. + void *p = orecs;
  38. + memset(p, 0, sizeof(atomic<gtm_word>) * L2O_ORECS);
  39. +
  40. }
  41. };