https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71684
Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2016-06-28 Ever confirmed|0 |1 --- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> --- (In reply to Phil Longstaff from comment #0) > std::lock_guard constructor calls gthread_mutex_lock() which calls > pthread_mutex_lock(), a 'struct pthread_mutex' will be created using > calloc() and then locked. I was made aware of this behaviour of FreeBSD recently, but I'm not sure that it's conforming. pthread_mutex_lock() isn't allowed to fail with ENOMEM (and EAGAIN is supposed to mean too many locks are held, not that memory couldn't be allocated). Conforming or not, we need to deal with it.