staticanalysis / data-race-test

Automatically exported from code.google.com/p/data-race-test
0 stars 0 forks source link

ThreadSanitizer should support lockf(2) #60

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
lockf() is used to apply, test or remove POSIX locks on files or sections of 
files.
Chromium uses lockf() to lock or unlock shared memory:
lockf(file, F_LOCK, 0) and lockf(file, F_ULOCK, 0)

However, implementing the full lockf() functionality might be tricky, because:
 -- the locks are automatically released upon the file is closed;
 -- a lock is determined by a triple of a file descriptor, file offset and the current file position;
 -- if two locked sections overlap, they're merged

See also http://code.google.com/p/chromium/issues/detail?id=45083

Original issue reported on code.google.com by ramosian.glider@gmail.com on 3 Feb 2011 at 11:51