From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/4918 Path: news.gmane.org!not-for-mail From: John Mudd Newsgroups: gmane.linux.lib.musl.general Subject: asctime(0) Segmentation fault Date: Sat, 19 Apr 2014 18:16:28 -0400 Message-ID: Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=089e0149426853c1b404f76c9fd0 X-Trace: ger.gmane.org 1397945828 17169 80.91.229.3 (19 Apr 2014 22:17:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 19 Apr 2014 22:17:08 +0000 (UTC) To: musl Original-X-From: musl-return-4922-gllmg-musl=m.gmane.org@lists.openwall.com Sun Apr 20 00:17:02 2014 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1WbdZF-0005tq-Bc for gllmg-musl@plane.gmane.org; Sun, 20 Apr 2014 00:17:01 +0200 Original-Received: (qmail 5288 invoked by uid 550); 19 Apr 2014 22:16:59 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 5280 invoked from network); 19 Apr 2014 22:16:59 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=Ulg0vcBHeKHqB9HE0naTTrixk81N7G95A3xHGQXj0tM=; b=XkquyYvkFTsQ6WwA5RRCTEODXEU461+3mwVP7m+4ji4hQshHLjDD2Y80UUPLwaIhTS ftHaN9QqIR5I6HNVhw7+HYJJIKnOp9z9zyZl9GAV9hYCe0Dmq5iNqe8CGN9AGDyeWwLk Sp9IAcsWqYJ8TKWKouyNByADOACgPZQEy5e0MRHxxLTvdmEGHjQv1JNoj0byEnAC6hex idFXbz3yfZq+t032bAX2GobFfmGPR8xnv8x5pxI/nA9CoTJN7eaxPPf7VTXboxVJT6Rn EDJTJDdU4YjMCmBF9U0t/LS11dYehYjfWfHNxSYJ53GM7bZ0oggwM3ss2lYCyHbzw/V7 J5tA== X-Received: by 10.152.19.7 with SMTP id a7mr19902480lae.16.1397945808436; Sat, 19 Apr 2014 15:16:48 -0700 (PDT) Xref: news.gmane.org gmane.linux.lib.musl.general:4918 Archived-At: --089e0149426853c1b404f76c9fd0 Content-Type: text/plain; charset=ISO-8859-1 I found this by running "make test" on musl build of Python. $ cat test_asctime.c #include #include int main() { char *c = asctime(0); printf("After asctime\n"); if (c) printf("c=%s", c); } $ gcc test_asctime.c -o test_asctime $ test_asctime After asctime $ musl-gcc test_asctime.c -o test_asctime $ test_asctime Segmentation fault (core dumped) $ --089e0149426853c1b404f76c9fd0 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
I found this by running "make test" on musl= build of Python.

$ cat test_asctime.c
#= include <time.h>
#include <stdio.h>

int main()
{
=A0 =A0 char *c =3D asctime(0);
=
=A0 =A0 printf("After asctime\n");
=A0 =A0 if (c) = printf("c=3D%s", c);
}
$ gcc test_asctime.c = =A0 -o test_asctime
$ test_asctime
After asctime
$ musl-gcc test_ascti= me.c =A0 -o test_asctime
$ test_asctime
Segmentation fa= ult (core dumped)
$=A0

--089e0149426853c1b404f76c9fd0--