[Webkit-unassigned] [Bug 84970] Mutex failure when HashTable is memcpy'ed in debug build

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Apr 26 13:34:25 PDT 2012


https://bugs.webkit.org/show_bug.cgi?id=84970





--- Comment #7 from Yong Li <yong.li.webkit at gmail.com>  2012-04-26 13:34:25 PST ---
(In reply to comment #6)
> > Mutex isn't copyable on many platforms.
> 
> Are you saying that it's not movable with memcpy? Why does the problem occur?

The behavior of using a copied mutex is undefined. (CRITICAL_SECTION on Windows is not copyable, too). The addresses of mutexes are critical, and can be used by system to identify them.

http://linux.die.net/man/3/pthread_mutex_init

"Only mutex itself may be used for performing synchronization. The result of referring to copies of mutex in calls to pthread_mutex_lock(), pthread_mutex_trylock(), pthread_mutex_unlock(), and pthread_mutex_destroy() is undefined."

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list