I tried your code with little modified makefile and I still get the same segfault:<br><br>enerccio@G73Jh-Arch:~/tmp$ make<br>gcc main.c thread.c -lecl -o main -lpthread `ecl-config --ldflags` `ecl-config --cflags`<br>enerccio@G73Jh-Arch:~/tmp$ ./main <br>

Segmentation fault<br>enerccio@G73Jh-Arch:~/tmp$ gdb ./main<br>GNU gdb (GDB) 7.4.1<br>Copyright (C) 2012 Free Software Foundation, Inc.<br>License GPLv3+: GNU GPL version 3 or later <<a href="http://gnu.org/licenses/gpl.html" target="_blank">http://gnu.org/licenses/gpl.html</a>><br>

This is free software: you are free to change and redistribute it.<br>There is NO WARRANTY, to the extent permitted by law.  Type "show copying"<br>and "show warranty" for details.<br>This GDB was configured as "x86_64-unknown-linux-gnu".<br>

For bug reporting instructions, please see:<br><<a href="http://www.gnu.org/software/gdb/bugs/" target="_blank">http://www.gnu.org/software/gdb/bugs/</a>>...<br>Reading symbols from /media/home/home/enerccio/tmp/<div id=":11y">
main...(no debugging symbols found)...done.<br>
(gdb) start<br>Temporary breakpoint 1 at 0x400a1d<br>Starting program: /media/home/home/enerccio/tmp/main <br>warning: Could not load shared library symbols for linux-vdso.so.1.<br>Do you need "set solib-search-path" or "set sysroot"?<br>

[Thread debugging using libthread_db enabled]<br>Using host libthread_db library "/lib/libthread_db.so.1".<br><br>Temporary breakpoint 1, 0x0000000000400a1d in main ()<br>(gdb) continue<br>Continuing.<br>[New Thread 0x7ffff6920700 (LWP 19100)]<br>

[New Thread 0x7ffff611f700 (LWP 19101)]<br>[New Thread 0x7ffff591e700 (LWP 19102)]<br>[New Thread 0x7ffff511d700 (LWP 19103)]<br>[New Thread 0x7ffff491c700 (LWP 19104)]<br>[New Thread 0x7ffff411b700 (LWP 19105)]<br>[New Thread 0x7ffff391a700 (LWP 19106)]<br>

[New Thread 0x7ffff3119700 (LWP 19107)]<br>[New Thread 0x7ffff2918700 (LWP 19108)]<br>[New Thread 0x7ffff2117700 (LWP 19109)]<br>[New Thread 0x7ffff1916700 (LWP 19110)]<br>[New Thread 0x7ffff1115700 (LWP 19111)]<br>[New Thread 0x7ffff0914700 (LWP 19112)]<br>

[New Thread 0x7ffff0113700 (LWP 19113)]<br>[New Thread 0x7fffef912700 (LWP 19114)]<br>[New Thread 0x7fffef111700 (LWP 19115)]<br><br>Program received signal SIGSEGV, Segmentation fault.<br>[Switching to Thread 0x7ffff3119700 (LWP 19107)]<br>

0x00007ffff72d596a in __dcigettext () from /lib/libc.so.6<br>(gdb) bt -50<br>#99765 0x00007ffff7a02935 in ecl_alloc_object () from /usr/lib/libecl.so.12.7<br>#99766 0x00007ffff79c0cd3 in ecl_make_simple_base_string ()<br>

   from /usr/lib/libecl.so.12.7<br>#99767 0x00007ffff79bfed1 in FElibc_error () from /usr/lib/libecl.so.12.7<br>#99768 0x00007ffff79fea37 in ecl_process_env () from /usr/lib/libecl.so.12.7<br>#99769 0x00007ffff7a02935 in ecl_alloc_object () from /usr/lib/libecl.so.12.7<br>

#99770 0x00007ffff79c0cd3 in ecl_make_simple_base_string ()<br>   from /usr/lib/libecl.so.12.7<br>#99771 0x00007ffff79bfed1 in FElibc_error () from /usr/lib/libecl.so.12.7<br>#99772 0x00007ffff79fea37 in ecl_process_env () from /usr/lib/libecl.so.12.7<br>

#99773 0x00007ffff7a02935 in ecl_alloc_object () from /usr/lib/libecl.so.12.7<br>#99774 0x00007ffff79c0cd3 in ecl_make_simple_base_string ()<br>   from /usr/lib/libecl.so.12.7<br>#99775 0x00007ffff79bfed1 in FElibc_error () from /usr/lib/libecl.so.12.7<br>

#99776 0x00007ffff79fea37 in ecl_process_env () from /usr/lib/libecl.so.12.7<br>#99777 0x00007ffff7a02935 in ecl_alloc_object () from /usr/lib/libecl.so.12.7<br>#99778 0x00007ffff79c0cd3 in ecl_make_simple_base_string ()<br>

   from /usr/lib/libecl.so.12.7<br>#99779 0x00007ffff79bfed1 in FElibc_error () from /usr/lib/libecl.so.12.7<br>#99780 0x00007ffff79fea37 in ecl_process_env () from /usr/lib/libecl.so.12.7<br>---Type <return> to continue, or q <return> to quit---<br>

#99781 0x00007ffff7a02935 in ecl_alloc_object () from /usr/lib/libecl.so.12.7<br>#99782 0x00007ffff79c0cd3 in ecl_make_simple_base_string ()<br>   from /usr/lib/libecl.so.12.7<br>#99783 0x00007ffff79bfed1 in FElibc_error () from /usr/lib/libecl.so.12.7<br>

#99784 0x00007ffff79fea37 in ecl_process_env () from /usr/lib/libecl.so.12.7<br>#99785 0x00007ffff7a02935 in ecl_alloc_object () from /usr/lib/libecl.so.12.7<br>#99786 0x00007ffff79c0cd3 in ecl_make_simple_base_string ()<br>

   from /usr/lib/libecl.so.12.7<br>#99787 0x00007ffff79bfed1 in FElibc_error () from /usr/lib/libecl.so.12.7<br>#99788 0x00007ffff79fea37 in ecl_process_env () from /usr/lib/libecl.so.12.7<br>#99789 0x00007ffff7a02935 in ecl_alloc_object () from /usr/lib/libecl.so.12.7<br>

#99790 0x00007ffff79c0cd3 in ecl_make_simple_base_string ()<br>   from /usr/lib/libecl.so.12.7<br>#99791 0x00007ffff79bfed1 in FElibc_error () from /usr/lib/libecl.so.12.7<br>#99792 0x00007ffff79fea37 in ecl_process_env () from /usr/lib/libecl.so.12.7<br>

#99793 0x00007ffff7a02935 in ecl_alloc_object () from /usr/lib/libecl.so.12.7<br>#99794 0x00007ffff79c0cd3 in ecl_make_simple_base_string ()<br>   from /usr/lib/libecl.so.12.7<br>#99795 0x00007ffff79bfed1 in FElibc_error () from /usr/lib/libecl.so.12.7<br>

#99796 0x00007ffff79fea37 in ecl_process_env () from /usr/lib/libecl.so.12.7<br>---Type <return> to continue, or q <return> to quit---<br>#99797 0x00007ffff7a02935 in ecl_alloc_object () from /usr/lib/libecl.so.12.7<br>

#99798 0x00007ffff79c0cd3 in ecl_make_simple_base_string ()<br>   from /usr/lib/libecl.so.12.7<br>#99799 0x00007ffff79bfed1 in FElibc_error () from /usr/lib/libecl.so.12.7<br>#99800 0x00007ffff79fea37 in ecl_process_env () from /usr/lib/libecl.so.12.7<br>

#99801 0x00007ffff7a02935 in ecl_alloc_object () from /usr/lib/libecl.so.12.7<br>#99802 0x00007ffff79c0cd3 in ecl_make_simple_base_string ()<br>   from /usr/lib/libecl.so.12.7<br>#99803 0x00007ffff79bfed1 in FElibc_error () from /usr/lib/libecl.so.12.7<br>

#99804 0x00007ffff79fea37 in ecl_process_env () from /usr/lib/libecl.so.12.7<br>#99805 0x00007ffff7a02935 in ecl_alloc_object () from /usr/lib/libecl.so.12.7<br>#99806 0x00007ffff79c0cd3 in ecl_make_simple_base_string ()<br>

   from /usr/lib/libecl.so.12.7<br>#99807 0x00007ffff79bfed1 in FElibc_error () from /usr/lib/libecl.so.12.7<br>#99808 0x00007ffff79fea37 in ecl_process_env () from /usr/lib/libecl.so.12.7<br>#99809 0x00007ffff7a02935 in ecl_alloc_object () from /usr/lib/libecl.so.12.7<br>

#99810 0x00007ffff79ff088 in ?? () from /usr/lib/libecl.so.12.7<br>#99811 0x00007ffff79ff21a in ecl_import_current_thread ()<br>   from /usr/lib/libecl.so.12.7<br>#99812 0x00000000004009d7 in foo ()<br>---Type <return> to continue, or q <return> to quit---<br>

#99813 0x00007ffff7652e0f in start_thread () from /lib/libpthread.so.0<br>#99814 0x00007ffff738a04d in clone () from /lib/libc.so.6<br>(gdb) <div class=""><div id=":17q" class="" tabindex="0"><img class="" src="https://mail.google.com/mail/u/0/images/cleardot.gif"></div>
</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2012/10/31 Juan Jose Garcia-Ripoll <span dir="ltr"><<a href="mailto:juanjose.garciaripoll@gmail.com" target="_blank">juanjose.garciaripoll@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Wed, Oct 3, 2012 at 2:57 PM, Stanislav Frolov <span dir="ltr"><<a href="mailto:frolosofsky@gmail.com" target="_blank">frolosofsky@gmail.com</a>></span> wrote:<br>
<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div>Hi and thanks for the fix. Previous example works fine but my problems</div>
continue. Now I try use ECL with third-party thread abstraction (where gc<br>
macro cant replace thread calls). The following example illustrates the bug:</blockquote></div><div><br></div>Fixed in ECL. I had misunderstood how the thread registration works. The attached example, which is basically yours plus formatting, works great with 128 threads and more.<div>


<br></div><div>Juanjo<span class="HOEnZb"><font color="#888888"><br clear="all"><div><br></div>-- <br>Instituto de Física Fundamental, CSIC<br>c/ Serrano, 113b, Madrid 28006 (Spain) <br><a href="http://juanjose.garciaripoll.googlepages.com" target="_blank">http://juanjose.garciaripoll.googlepages.com</a><br>



</font></span></div>
<br>------------------------------------------------------------------------------<br>
Everyone hates slow websites. So do we.<br>
Make your web apps faster with AppDynamics<br>
Download AppDynamics Lite for free today:<br>
<a href="http://p.sf.net/sfu/appdyn_sfd2d_oct" target="_blank">http://p.sf.net/sfu/appdyn_sfd2d_oct</a><br>_______________________________________________<br>
Ecls-list mailing list<br>
<a href="mailto:Ecls-list@lists.sourceforge.net">Ecls-list@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/ecls-list" target="_blank">https://lists.sourceforge.net/lists/listinfo/ecls-list</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Bc. Peter Vaňušanik<br><a href="http://www.bishojo.tk" target="_blank">http://www.bishojo.tk</a><br><br>
</div>