Hi, I think I found the bug. I is strange that this hasn't been discovered
earlier.



[kjetil@ttlush faust2]$ diff -u
compiler/generator/llvm/llvm_instructions.hh~
compiler/generator/llvm/llvm_instructions.hh
--- compiler/generator/llvm/llvm_instructions.hh~    2016-06-08
13:36:37.000000000 +0200
+++ compiler/generator/llvm/llvm_instructions.hh    2016-06-08
19:09:13.428715406 +0200
@@ -52,7 +52,7 @@
 #endif

 #if defined(LLVM_38)
-    #define GET_ITERATOR(it) &(*it)
+    #define GET_ITERATOR(it) &(*(it))
 #else
     #define GET_ITERATOR(it) it
 #endif
@@ -933,15 +933,19 @@
     #endif
         {
             string str = replaceChar(unquote(arg), '@', '_');
-
+
+        #if defined(LLVM_37) || defined(LLVM_38)
+            ArrayType* array_type = ArrayType::get(fBuilder->getInt8Ty(),
str.size() + 1);
+            type_def = array_type;
+        #endif
+
             if (fGlobalStringTable.find(str) == fGlobalStringTable.end()) {
+            #if !defined(LLVM_37) && !defined(LLVM_38)
                 ArrayType* array_type =
ArrayType::get(fBuilder->getInt8Ty(), str.size() + 1);
+            #endif
                 GlobalVariable* gvar_array_string0 = new
GlobalVariable(*fModule, array_type, true, GlobalValue::InternalLinkage, 0,
str);

gvar_array_string0->setInitializer(ConstantDataArray::getString(fModule->getContext(),
str, true));
                 fGlobalStringTable[str] = gvar_array_string0;
-            #if defined(LLVM_37) || defined(LLVM_38)
-                type_def = array_type;
-            #endif
                 return gvar_array_string0;
             } else {
                 return fGlobalStringTable[str];





On Wed, Jun 8, 2016 at 6:00 PM, Kjetil Matheussen <k.s.matheus...@gmail.com>
wrote:

> Very strange. It seems a little bit arbitrary when a program crashes
> though.
>
> How about this program:
>
> import("music.lib");
> process = 0;
>
> ?
>
> (this is the original program I reduced into the two "declare" lines)
>
>
>
>
> On Wed, Jun 8, 2016 at 5:56 PM, Stéphane Letz <l...@grame.fr> wrote:
>
>> Bizarre, it does not crash here..
>>
>> Stéphane
>>
>> > Le 8 juin 2016 à 17:50, Kjetil Matheussen <k.s.matheus...@gmail.com> a
>> écrit :
>> >
>> >
>> >
>> > On Wed, Jun 8, 2016 at 5:27 PM, Kjetil Matheussen <
>> k.s.matheus...@gmail.com> wrote:
>> >
>> > Could it be that this assert inside LLVM is not very important, and I
>> just need to recompile it with NDEBUG defined?
>> >
>> > No, commenting out the assert line in LLVM didn't help.
>> >
>>
>>
>
------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity 
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
Faudiostream-devel mailing list
Faudiostream-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/faudiostream-devel

Reply via email to