Ticket #14 (defect)

Opened 1 year ago

Last modified 1 year ago

bug in lock.upc

Status: closed (fixed)

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

lock.upc contains code:

if(MYTHREAD == 1) {

lock_attempt = upc_lock_attempt(lock2); if(lock_attempt != 0)

GULA_FAIL("failed to block");

upc_unlock(lock1);

}

the last unlock operation should be on lock2, not lock1

Change History

09/06/07 10:18:36: Modified by bonachea@cs.berkeley.edu

correction - the last unlock operation should not be there at all. The lock_attempt is supposed to fail on TH1, therefore the lock is not held by TH1 and calling unlock is erroneous by 7.2.4.7:

Unless the lock is in locked state and the calling thread is the locking thread, the result is undefined.

09/25/07 19:33:18: Modified by apokayi

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

removed the last unlock since it can only be called from the locking thread