mailing list of musl libc
 help / color / mirror / code / Atom feed
From: ojab <ojab@ojab.ru>
To: musl@lists.openwall.com
Subject: Re: Status of 1.0 wishlist items?
Date: Mon, 17 Dec 2012 16:47:06 +0400	[thread overview]
Message-ID: <50CF144A.9080708@ojab.ru> (raw)
In-Reply-To: <20121213220324.GH20323@brightrain.aerifal.cx>

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

On 14.12.2012 02:03, Rich Felker wrote:
>> - Development stack (GCC, LLVM/clang, GDB, strace, ...)
> Has anybody built LLVM/clang on musl? I believe the set of patches
> needed for GDB has been reduced quite a bit now, but I'm not sure what
> the status on strace is...
>

LLVM/clang (x86_64) builds (on sabotage) with the small patch (in the 
attached file), but there are 15 test failing (mostly segfaults at 
include/llvm/Type.h:133, see attached log):

Failing Tests (15):
     LLVM :: Instrumentation/AddressSanitizer/instrument_global.ll
     LLVM :: 
Instrumentation/AddressSanitizer/instrument_initializer_metadata.ll
     LLVM :: Instrumentation/ThreadSanitizer/atomic.ll
     LLVM :: Instrumentation/ThreadSanitizer/read_before_write.ll
     LLVM :: Instrumentation/ThreadSanitizer/read_from_global.ll
     LLVM :: Instrumentation/ThreadSanitizer/tsan_basic.ll
     LLVM :: Instrumentation/ThreadSanitizer/vptr_update.ll
     LLVM :: Other/close-stderr.ll
     LLVM :: Transforms/InstCombine/fprintf-1.ll
     LLVM :: Transforms/InstCombine/fputs-1.ll
     LLVM :: Transforms/InstCombine/osx-names.ll
     LLVM :: Transforms/InstCombine/stpcpy-1.ll
     LLVM :: Transforms/InstCombine/stpcpy_chk-1.ll
     LLVM :: Transforms/InstCombine/strcmp-1.ll
     LLVM :: Transforms/InstCombine/strcpy_chk-1.ll


In "[musl] Summary of 1.0 marketing plan/scheme/nefarious plot from 
IRC." thread there is pt. "- push "musl support" patches to other 
projects upstream all at once" — it's better to send patches to musl@ 
mail-list and leave it here or what?


//wbr ojab

[-- Attachment #2: llvm-musl.diff --]
[-- Type: text/plain, Size: 974 bytes --]

Index: lib/Support/DynamicLibrary.cpp
===================================================================
--- lib/Support/DynamicLibrary.cpp	(revision 170294)
+++ lib/Support/DynamicLibrary.cpp	(working copy)
@@ -155,7 +155,7 @@
 
 // This macro returns the address of a well-known, explicit symbol
 #define EXPLICIT_SYMBOL(SYM) \
-   if (!strcmp(symbolName, #SYM)) return &SYM
+   if (!strcmp(symbolName, #SYM)) return (void *) &SYM
 
 // On linux we have a weird situation. The stderr/out/in symbols are both
 // macros and global variables because of standards requirements. So, we
Index: utils/unittest/googletest/gtest.cc
===================================================================
--- utils/unittest/googletest/gtest.cc	(revision 170294)
+++ utils/unittest/googletest/gtest.cc	(working copy)
@@ -120,6 +120,7 @@
 
 #if GTEST_CAN_STREAM_RESULTS_
 # include <arpa/inet.h>  // NOLINT
+# include <sys/socket.h>  // NOLINT
 # include <netdb.h>  // NOLINT
 #endif
 

[-- Attachment #3: llvm_fails.log --]
[-- Type: text/plain, Size: 7491 bytes --]

~ # /root/llvm-build/Release+Asserts/bin/opt < /root/llvm/test/Instrumentation/AddressSanitizer/instrument_global.ll -asan -asan-module -S
Assertion failed: (ST->isOpaque() || ST->getNumElements() == V.size()) && "Incorrect # elements specified to ConstantStruct::get" (/root/llvm/lib/VMCore/Constants.cpp: get: 846)
Stack dump:
0.    Program arguments: /root/llvm-build/Release+Asserts/bin/opt -asan -asan-module -S 
1.    Running pass 'AddressSanitizerModule' on module '<stdin>'.
Killed


~ # /root/llvm-build/Release+Asserts/bin/opt < /root/llvm/test/Instrumentation/AddressSanitizer/instrument_initializer_metadata.ll -asan -asan-module -S
Stack dump:
0.    Program arguments: /root/llvm-build/Release+Asserts/bin/opt -asan -asan-module -S 
1.    Running pass 'Function Pass Manager' on module '<stdin>'.
2.    Running pass 'AddressSanitizerFunctionPass' on function '@_GLOBAL__I_a'
Segmentation fault (core dumped)
...
#0  0x00000000009315ba in llvm::Type::getTypeID (this=0x606060600000000) at /root/llvm/include/llvm/Type.h:133
No locals.
#1  0x0000000001270a26 in llvm::Type::isFirstClassType (this=0x606060600000000) at /root/llvm/include/llvm/Type.h:236
No locals.
#2  0x00000000013cf6cc in llvm::FunctionType::isValidArgumentType (ArgTy=0x606060600000000) at /root/llvm/lib/VMCore/Type.cpp:396
No locals.
#3  0x00000000013cf3fb in llvm::FunctionType::FunctionType (this=0x389c8e0, Result=0x38944a0, Params=..., IsVarArgs=false) at /root/llvm/lib/VMCore/Type.cpp:351
        i = 2
        e = 6
        SubTys = 0x389c8f8


~ # /root/llvm-build/Release+Asserts/bin/opt < /root/llvm/test/Instrumentation/ThreadSanitizer/atomic.ll -tsan -S
Stack dump:
0.    Program arguments: /root/llvm-build/Release+Asserts/bin/opt -tsan -S 
1.    Running pass 'Function Pass Manager' on module '<stdin>'.
2.    Running pass 'ThreadSanitizer' on function '@atomic8_load_unordered'
Segmentation fault (core dumped)
#0  0x00000000009315ba in llvm::Type::getTypeID (this=0xffffffff00000000) at /root/llvm/include/llvm/Type.h:133


~ # /root/llvm-build/Release+Asserts/bin/opt < /root/llvm/test/Instrumentation/ThreadSanitizer/read_before_write.ll -tsan -S
Stack dump:
0.    Program arguments: /root/llvm-build/Release+Asserts/bin/opt -tsan -S 
1.    Running pass 'Function Pass Manager' on module '<stdin>'.
2.    Running pass 'ThreadSanitizer' on function '@IncrementMe'
Segmentation fault (core dumped)
#0  0x00000000009315ba in llvm::Type::getTypeID (this=0xffffffff00000000) at /root/llvm/include/llvm/Type.h:133


~ # /root/llvm-build/Release+Asserts/bin/opt < /root/llvm/test/Instrumentation/ThreadSanitizer/read_from_global.ll -tsan -S
Stack dump:
0.    Program arguments: /root/llvm-build/Release+Asserts/bin/opt -tsan -S 
1.    Running pass 'Function Pass Manager' on module '<stdin>'.
2.    Running pass 'ThreadSanitizer' on function '@read_from_const_global'
Segmentation fault (core dumped)
#0  0x00000000009315ba in llvm::Type::getTypeID (this=0xffffffff00000000) at /root/llvm/include/llvm/Type.h:133


~ # /root/llvm-build/Release+Asserts/bin/opt < /root/llvm/test/Instrumentation/ThreadSanitizer/tsan_basic.ll -tsan -S
Stack dump:
0.    Program arguments: /root/llvm-build/Release+Asserts/bin/opt -tsan -S 
1.    Running pass 'Function Pass Manager' on module '<stdin>'.
2.    Running pass 'ThreadSanitizer' on function '@read_4_bytes'
Segmentation fault (core dumped)
#0  0x00000000009315ba in llvm::Type::getTypeID (this=0xffffffff00000000) at /root/llvm/include/llvm/Type.h:133


~ # /root/llvm-build/Release+Asserts/bin/opt < /root/llvm/test/Instrumentation/ThreadSanitizer/vptr_update.ll -tsan -S
Stack dump:
0.    Program arguments: /root/llvm-build/Release+Asserts/bin/opt -tsan -S 
1.    Running pass 'Function Pass Manager' on module '<stdin>'.
2.    Running pass 'ThreadSanitizer' on function '@Foo'
Segmentation fault (core dumped)
#0  0x00000000009315ba in llvm::Type::getTypeID (this=0xffffffff00000000) at /root/llvm/include/llvm/Type.h:133


LLVM :: Other/close-stderr.ll
hangs


~ # /root/llvm-build/Release+Asserts/bin/opt < /root/llvm/test/Transforms/InstCombine/fprintf-1.ll  -instcombine -S
Stack dump:
0.    Program arguments: /root/llvm-build/Release+Asserts/bin/opt -instcombine -S 
1.    Running pass 'Function Pass Manager' on module '<stdin>'.
2.    Running pass 'Combine redundant instructions' on function '@test_simplify1'
Segmentation fault (core dumped)
#0  0x00000000009315ba in llvm::Type::getTypeID (this=0x7fff00000000) at /root/llvm/include/llvm/Type.h:133


~ # /root/llvm-build/Release+Asserts/bin/opt < /root/llvm/test/Transforms/InstCombine/fputs-1.ll  -instcombine -S
Stack dump:
0.    Program arguments: /root/llvm-build/Release+Asserts/bin/opt -instcombine -S 
1.    Running pass 'Function Pass Manager' on module '<stdin>'.
2.    Running pass 'Combine redundant instructions' on function '@test_simplify1'
Segmentation fault (core dumped)
#0  0x00000000009315ba in llvm::Type::getTypeID (this=0x7fff00000000) at /root/llvm/include/llvm/Type.h:133


~ # /root/llvm-build/Release+Asserts/bin/opt < /root/llvm/test/Transforms/InstCombine/osx-names.ll  -instcombine -S
Stack dump:
0.    Program arguments: /root/llvm-build/Release+Asserts/bin/opt -instcombine -S 
1.    Running pass 'Function Pass Manager' on module '<stdin>'.
2.    Running pass 'Combine redundant instructions' on function '@test1'
Segmentation fault (core dumped)
#0  0x00000000009315ba in llvm::Type::getTypeID (this=0x7fff00000000) at /root/llvm/include/llvm/Type.h:133


~ # /root/llvm-build/Release+Asserts/bin/opt < /root/llvm/test/Transforms/InstCombine/stpcpy-1.ll  -instcombine -S
Stack dump:
0.    Program arguments: /root/llvm-build/Release+Asserts/bin/opt -instcombine -S 
1.    Running pass 'Function Pass Manager' on module '<stdin>'.
2.    Running pass 'Combine redundant instructions' on function '@test_simplify2'
Segmentation fault (core dumped)
#0  0x00000000009315ba in llvm::Type::getTypeID (this=0x1700000000) at /root/llvm/include/llvm/Type.h:133


~ # /root/llvm-build/Release+Asserts/bin/opt < /root/llvm/test/Transforms/InstCombine/stpcpy_chk-1.ll  -instcombine -S
Stack dump:
0.    Program arguments: /root/llvm-build/Release+Asserts/bin/opt -instcombine -S 
1.    Running pass 'Function Pass Manager' on module '<stdin>'.
2.    Running pass 'Combine redundant instructions' on function '@test_simplify1'
Segmentation fault (core dumped)
#0  0x00000000009315ba in llvm::Type::getTypeID (this=0xffffffff00000000) at /root/llvm/include/llvm/Type.h:133


~ # /root/llvm-build/Release+Asserts/bin/opt < /root/llvm/test/Transforms/InstCombine/strcmp-1.ll  -instcombine -S
Stack dump:
0.    Program arguments: /root/llvm-build/Release+Asserts/bin/opt -instcombine -S 
1.    Running pass 'Function Pass Manager' on module '<stdin>'.
2.    Running pass 'Combine redundant instructions' on function '@test5'
Segmentation fault (core dumped)
#0  0x00000000009315ba in llvm::Type::getTypeID (this=0x7fff00000000) at /root/llvm/include/llvm/Type.h:133


~ # /root/llvm-build/Release+Asserts/bin/opt < /root/llvm/test/Transforms/InstCombine/strcpy_chk-1.ll  -instcombine -S
Stack dump:
0.    Program arguments: /root/llvm-build/Release+Asserts/bin/opt -instcombine -S 
1.    Running pass 'Function Pass Manager' on module '<stdin>'.
2.    Running pass 'Combine redundant instructions' on function '@test_simplify1'
Segmentation fault (core dumped)
#0  0x00000000009315ba in llvm::Type::getTypeID (this=0xffffffff00000000) at /root/llvm/include/llvm/Type.h:133

      parent reply	other threads:[~2012-12-17 12:47 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-04 23:59 Revised 1.0 wishlist Rich Felker
2012-12-08  4:17 ` Rich Felker
2012-12-13 22:03 ` Status of 1.0 wishlist items? Rich Felker
2012-12-13 22:36   ` John Spencer
2012-12-13 23:48     ` Rich Felker
2012-12-14  0:41       ` Szabolcs Nagy
2012-12-21 20:22       ` John Spencer
2012-12-14  5:14   ` Luca Barbato
2012-12-17 12:47   ` ojab [this message]

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=50CF144A.9080708@ojab.ru \
    --to=ojab@ojab.ru \
    --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).