Ticket #13 (defect)

Opened 1 year ago

Last modified 1 year ago

lock_attempt.upc is erroneous

Status: closed (fixed)

Reported by: bonachea@cs.berkeley.edu Assigned to: apokayi
Priority: major Milestone:
Component: component1 Version:
Keywords: Cc:

lock_attempt.upc includes code:

lock1 = upc_all_lock_alloc();

upc_lock(lock1); check_parm = upc_lock_attempt(lock1); a = local_a; upc_unlock(lock1);

This has undefined behavior by UPC 7.2.4.5:

If the lock is already in locked state due to the calling thread setting it to locked state, the result is undefined.

Later in the code the same violation occurs on thread 0:

lock3 = upc_all_lock_alloc();

if(MYTHREAD == 0) {

upc_lock(lock3); a = local_a + MYTHREAD;

}

upc_barrier; check_parm = upc_lock_attempt(lock3);

Change History

09/06/07 16:33:50: Modified by sbahra

  • owner changed from somebody to apokayi.
  • description changed.

10/14/07 03:39:05: Modified by apokayi

  • status changed from new to closed.
  • resolution set to fixed.

undefined cases are fixed by enforcing the lock_attempt calls to be made by the threads other than the calling thread