mailing list of musl libc
 help / color / mirror / code / Atom feed
From: John Mudd <johnbmudd@gmail.com>
To: musl <musl@lists.openwall.com>
Subject: asctime(0) Segmentation fault
Date: Sat, 19 Apr 2014 18:16:28 -0400	[thread overview]
Message-ID: <CAGDMk9FbmYr1GKHp5c6QQ8o1xzUUXqb1ipS9QdAdqEg-D+p7oQ@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 385 bytes --]

I found this by running "make test" on musl build of Python.

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

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)
$

[-- Attachment #2: Type: text/html, Size: 672 bytes --]

             reply	other threads:[~2014-04-19 22:16 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-19 22:16 John Mudd [this message]
2014-04-19 22:36 ` Jens Gustedt
2014-04-19 22:46 ` John Mudd
2014-04-20  1:43   ` Szabolcs Nagy
2014-04-20  1:59     ` Rich Felker
2014-04-20  2:43   ` John Mudd
2014-04-20  2:51     ` John Mudd
2014-04-20  3:15       ` Rich Felker
2014-04-20  3:33       ` John Mudd
2014-04-20  3:35         ` Rich Felker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAGDMk9FbmYr1GKHp5c6QQ8o1xzUUXqb1ipS9QdAdqEg-D+p7oQ@mail.gmail.com \
    --to=johnbmudd@gmail.com \
    --cc=musl@lists.openwall.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).