From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/10384 Path: news.gmane.org!.POSTED!not-for-mail From: Steve Osselton Newsgroups: gmane.linux.lib.musl.general Subject: Duplicate call to pthread_join segvs Date: Thu, 18 Aug 2016 12:51:23 +0100 Message-ID: Reply-To: musl@lists.openwall.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a1142e5507eaef3053a573302 X-Trace: blaine.gmane.org 1471524322 27365 195.159.176.226 (18 Aug 2016 12:45:22 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 18 Aug 2016 12:45:22 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-10397-gllmg-musl=m.gmane.org@lists.openwall.com Thu Aug 18 14:45:17 2016 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.84_2) (envelope-from ) id 1baMhB-0006pj-L2 for gllmg-musl@m.gmane.org; Thu, 18 Aug 2016 14:45:17 +0200 Original-Received: (qmail 21539 invoked by uid 550); 18 Aug 2016 12:45:15 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 32326 invoked from network); 18 Aug 2016 11:51:36 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=prismtech-com.20150623.gappssmtp.com; s=20150623; h=mime-version:reply-to:from:date:message-id:subject:to; bh=znpb7H2v6kM2ZsBDPQQ3L5M4cGaQtLD0K8E/AigDKTc=; b=FWuvaZuXIhVxvsPhMrZnJcEnp2wQB2EZhlqJyrsk1DkmZcSlGL6O1bq7FVHeasm8bj OA3duzWeUl+FvHKQNEbbGfFzklXgoIXkRY4qiiAFwxdXnoaf5Pz0AZmQZ1aooR9WzW1O cT11WE1JNMr5EetbEdWEtzz54DaqSId44IsL91dt0NBJ56iC5AxL2AJPTEDkcmTiGI39 /roVXwQynZRZZkan77XAjpwg0PQQ9ZAI5ciaY32Vz00E3avqbogDPYdSLDaFgP8umB8z +aWELdFOUGZQbKVUYAFPsdtFdUVkRno/HUe6BoK8gu7qyf4SywRdmryF19QrTXZQTob0 Dmtw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:reply-to:from:date:message-id :subject:to; bh=znpb7H2v6kM2ZsBDPQQ3L5M4cGaQtLD0K8E/AigDKTc=; b=HBPtEITbADH8VGNHd8rhE+sXliFeGXpyooEK3Vc7wjTC+mxC+78O7jTw6u1zh+WaPp 9/y2W60whLLfrhlrwZOpnWr337JK7k4a06U6FUS9ivs4Vk5urkF2MEL6sfOPEs1GHpPm BKXg/UNkitIOU19GKy2jsr38/2pFBGXMusYwOKhK7LfnwGzkMMu3hlJIwf5IDe8VZH0P /WJ7rIlkv+jdqjDNqQSQMZ8g/ewPeyDreL+ggIsQvKQGCH4u5lXuM6BHPlmgX1n8MtWy eXEpYUk3FW8H3NgjKSXdn08NCCV0OZSaGCUo4SC3yw3Kffz16iBT4V/M4KJBfJHtZH1p 6fLw== X-Gm-Message-State: AEkoousU/1PyynB75BKyIqnAid56mQ5hnMwKvZavfcYrT2VupLUZOWJFu8a6jY6gI4UUEeX6bfx5XQb5iEvKrVcw X-Received: by 10.176.2.242 with SMTP id 105mr874343uah.10.1471521084051; Thu, 18 Aug 2016 04:51:24 -0700 (PDT) Xref: news.gmane.org gmane.linux.lib.musl.general:10384 Archived-At: --001a1142e5507eaef3053a573302 Content-Type: text/plain; charset=UTF-8 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: #include void * start_routine (void * arg) { } int main (int argc, char ** argv) { pthread_t id; pthread_create (&id, NULL, start_routine, NULL); pthread_join (id, NULL); pthread_join (id, NULL); } Cheers Steve. --001a1142e5507eaef3053a573302 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi,

Am using musl on the latest A= lpine Linux release. Although the behaviour of calling=C2=A0pthread_join on=
the same thread is undefined, would be nice if returned an errno as op= posed to a segv:

#include <pthread.h>

void * start_routine (void * arg)
{
=
}

int main (int argc, char ** argv)
{
=C2=A0 pthread_t id;

=C2=A0 pthread_c= reate (&id, NULL, start_routine, NULL);
=C2=A0 pthread_join (= id, NULL);
=C2=A0 pthread_join (id, NULL);
}

Cheers Steve.
--001a1142e5507eaef3053a573302--