Date: Mon, 11 Feb 2019 16:41:18 +0200 From: Konstantin Belousov <kostikbel@gmail.com> To: Banta Plan <bantaplan@outlook.de> Cc: "freebsd-toolchain@freebsd.org" <freebsd-toolchain@freebsd.org> Subject: Re: Problem with mutex.lock() Message-ID: <20190211144118.GZ24863@kib.kiev.ua> In-Reply-To: <VI1PR02MB467184217B4C8A23BA5EE037D7640@VI1PR02MB4671.eurprd02.prod.outlook.com> References: <VI1PR02MB467184217B4C8A23BA5EE037D7640@VI1PR02MB4671.eurprd02.prod.outlook.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Feb 11, 2019 at 02:04:38PM +0000, Banta Plan wrote: > I think you can reduce the problem to: > ## > int main() { > std::mutex m; > m.lock(); > m.lock(); > > return 0; > } > ## > > This should deadlock. Where is it specified that the program should deadlock ? The behaviour for this case is undefined. > But this will crash the program. Which is not disallowed by standard.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20190211144118.GZ24863>