Date: Thu, 18 Aug 2016 08:47:49 -0400 From: Rich Felker <dalias@...c.org> To: musl@...ts.openwall.com Subject: Re: Duplicate call to pthread_join segvs On Thu, Aug 18, 2016 at 12:51:23PM +0100, Steve Osselton wrote: > Hi, > > Am using musl on the latest Alpine Linux release. Although the behaviour of > calling pthread_join on > the same thread is undefined, would be nice if returned an errno as opposed > to a segv: No, that would be harmful because it would hide an extremely serious bug (think what happens if another thread had been created after the first join and its id happened to match the id of the already-joined one). It would also be generally impossible to produce. pthread_join is inherently a free-type operation (it frees a resource) and double-frees are not reliably detectable unless the implementation just never reuses freed resources at all (i.e. leak them). Rich
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.