$ gdb --args poly --use test.ML .... .... val lib = ?: dylib val diff = fn: int * int -> int Reading symbols for shared libraries ...................... done
Program received signal SIGTRAP, Trace/breakpoint trap. [Switching to process 75853 thread 0x1703] 0x00007fff8619cedf in __CFInitialize () (gdb) bt #0 0x00007fff8619cedf in __CFInitialize () #1 0x00007fff5fc0fe6f in __dyld__ZN16ImageLoaderMachO11doImageInitERKN11ImageLoader11LinkContextE () #2 0x00007fff5fc0fae7 in __dyld__ZN16ImageLoaderMachO16doInitializationERKN11ImageLoader11LinkContextE () #3 0x00007fff5fc0d2e4 in __dyld__ZN11ImageLoader23recursiveInitializationERKNS_11LinkContextEjRNS_21InitializerTimingListE () #4 0x00007fff5fc0d27d in __dyld__ZN11ImageLoader23recursiveInitializationERKNS_11LinkContextEjRNS_21InitializerTimingListE () #5 0x00007fff5fc0d27d in __dyld__ZN11ImageLoader23recursiveInitializationERKNS_11LinkContextEjRNS_21InitializerTimingListE () #6 0x00007fff5fc0e0b7 in __dyld__ZN11ImageLoader15runInitializersERKNS_11LinkContextERNS_21InitializerTimingListE () #7 0x00007fff5fc031b9 in __dyld__ZN4dyld15runInitializersEP11ImageLoader () #8 0x00007fff5fc09657 in __dyld_dlopen () #9 0x00007fff84c5195b in dlopen () #10 0x000000010095f25a in load_lib (taskData=0x100d005b0, string=0x101829a08) at foreign.cpp:738 #11 0x000000010095eff5 in foreign_dispatch_c (taskData=0x100d005b0, args=0x101829a08, fcode_h=0x101829a00) at foreign.cpp:1699 #12 0x00000001009b6634 in X86Dependent::CallIO2 (this=0x100a42d90, taskData=0x100d005b0, ioFun=0x10095eeb0 <foreign_dispatch_c(TaskData*, SaveVecEntry*, SaveVecEntry*)>) at x86_dep.cpp:680 #13 0x00000001009a1576 in EnterPolyCode (taskData=0x100d005b0) at run_time.cpp:1326 #14 0x000000010098ef62 in NewThreadFunction (parameter=0x100d005b0) at processes.cpp:1121 #15 0x00007fff886ad8bf in _pthread_start () #16 0x00007fff886b0b75 in thread_start () (gdb) continue Continuing.
Program received signal SIGKILL, Killed. [Switching to process 75853 thread 0x1307] 0x00007fff8c597bca in __psynch_cvwait () (gdb) bt #0 0x00007fff8c597bca in __psynch_cvwait () #1 0x00007fff886b1274 in _pthread_cond_wait () #2 0x0000000100971b9c in PCondVar::WaitFor (this=0x100a40e48, pLock=0x100a40de8, milliseconds=400) at locking.cpp:244 #3 0x000000010098d287 in Processes::BeginRootThread (this=0x100a40dc0, rootFunction=0x100000e98) at processes.cpp:1315 #4 0x0000000100979994 in polymain (argc=3, argv=0x7fff5fbfef68, exports=0x1009e41c0) at mpoly.cpp:300 #5 0x000000010094f94a in main (argc=3, argv=0x7fff5fbfef68) at polystub.c:43 (gdb) continue Continuing.
Program terminated with signal SIGKILL, Killed. The program no longer exists.
On 2 July 2012 18:19, David Matthews David.Matthews@prolingua.co.uk wrote:
On 02/07/2012 17:30, Aleks Kissinger wrote:
Argh, sorry to spam. It seems Carbon is a red herring. poly/CInterface seems to crash when the code is linking *any* framework via the "-framework XXX" option to gcc.
But these cause poly to receive a SIGKILL: $ gcc -c diff.c $ gcc -framework Carbon -shared diff.o -o libdiff.so $ poly --use test.ML ... val lib = ?: dylib val diff = fn: int * int -> int [1] 64760 killed poly --use test.ML
Have you tried running this with gdb? It would probably be best to build poly for debugging first: make distclean ./configure --enable-debug --disable-shared make
If you manage to get a trace I may be able to make some sense of it.
David
polyml mailing list polyml@inf.ed.ac.uk http://lists.inf.ed.ac.uk/mailman/listinfo/polyml