|
Message-ID: <4797553.4BPKurOpfG@main.pennware.com> Date: Fri, 25 May 2012 16:40:51 -0500 From: Richard Pennington <rich@...nware.com> To: musl@...ts.openwall.com Subject: clang/musl progress and a small bug. Hi, clang's libcompiler-rt doesn't have support for crtbegin.o and crtend.o so global constructors and destructors didn't work out of the box. If I link with the NetBSD versions of crtbegin.c and crtend.c in place of the musl crti.s and crtn.s everything works fine. For now, I've added them to the musl build under crt. I think I found a bug while running my library regression test. The zero test failed in the following code: TEST_TRACE(C99 7.20.3.1) p = calloc(100, sizeof(char)); TEST(p != NULL, "calloc() returned a pointer"); int flag = 1; for (i = 0; i < 100; ++i) { if (p[i] != 0) { flag = 0; } } TEST(flag, "calloc() returned zeroed memory"); The TEST() macro is kind of like assert but it prints out the message and counts failures and successes: PASS: 001stdlib.c:74: Stdlib(Stdlib): calloc() returned a pointer FAIL: 001stdlib.c:81: Stdlib(Stdlib): calloc() returned zeroed memory Stdlib unit tests completed 32 tests run 1 test failed Am I missing something? -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.