Comments (10)
What is the version of libpthread in your Ubuntu ?
Does it still crash if you run a version compiled on your Arch linux ?
CToy enables live coding, it recompiles when the source code is modified, that's what run in the thread.
CToy_player just compiles at the beginning (no live coding).
from ctoy.
The ubuntu version is 2.23, and yes it still crashes with the same backtrace, when compiled on Arch
from ctoy.
I'm not sure but it's possible you may have to recompile libtcc.so too on Arch.
It would be surprising if the bug is related to libpthead. Or the bug comes from the code running in the thread, or something related to libtcc and (maybe) the version of glibc used to compile libtcc.
from ctoy.
If the version of glibc used to commile libtcc.so on ubuntu is more recent than glibc used in Arch linux it could cause a crash on certain conditions (except if you already recompiled libtcc).
from ctoy.
Sorry about the delay.
I compiled libtcc on this Arch laptop, and I still get the same issue with the same bt.
However I do find the different versions of GLIBC mentioned in the following weird. Remember that ldd --version gives me 2.26, so these are 3 different versions where I would expect one.
[ian@arch MTCL]$ readelf -s CToy | grep pthread
6: 0000000000000000 0 FUNC GLOBAL DEFAULT UND pthread_getspecific@GLIBC_2.2.5 (3)
9: 0000000000000000 0 FUNC GLOBAL DEFAULT UND pthread_cond_destroy@GLIBC_2.3.2 (4)
17: 0000000000000000 0 FUNC GLOBAL DEFAULT UND pthread_mutex_timedlock@GLIBC_2.2.5 (3)
21: 0000000000000000 0 FUNC GLOBAL DEFAULT UND pthread_setspecific@GLIBC_2.2.5 (3)
33: 0000000000000000 0 FUNC GLOBAL DEFAULT UND pthread_cond_signal@GLIBC_2.3.2 (4)
38: 0000000000000000 0 FUNC GLOBAL DEFAULT UND pthread_mutexattr_destroy@GLIBC_2.2.5 (3)
55: 0000000000000000 0 FUNC GLOBAL DEFAULT UND pthread_cond_timedwait@GLIBC_2.3.2 (4)
67: 0000000000000000 0 FUNC GLOBAL DEFAULT UND pthread_mutex_init@GLIBC_2.2.5 (3)
87: 0000000000000000 0 FUNC GLOBAL DEFAULT UND pthread_create@GLIBC_2.2.5 (3)
91: 0000000000000000 0 FUNC GLOBAL DEFAULT UND pthread_cond_init@GLIBC_2.3.2 (4)
98: 0000000000000000 0 FUNC GLOBAL DEFAULT UND pthread_key_delete@GLIBC_2.2.5 (3)
106: 0000000000000000 0 FUNC GLOBAL DEFAULT UND pthread_self@GLIBC_2.2.5 (3)
107: 0000000000000000 0 FUNC GLOBAL DEFAULT UND pthread_join@GLIBC_2.2.5 (3)
109: 0000000000000000 0 FUNC GLOBAL DEFAULT UND pthread_mutex_trylock@GLIBC_2.2.5 (3)
115: 0000000000000000 0 FUNC GLOBAL DEFAULT UND pthread_exit@GLIBC_2.2.5 (3)
142: 0000000000000000 0 FUNC GLOBAL DEFAULT UND pthread_mutexattr_settype@GLIBC_2.2.5 (3)
163: 0000000000000000 0 FUNC GLOBAL DEFAULT UND pthread_cond_wait@GLIBC_2.3.2 (4)
164: 0000000000000000 0 FUNC GLOBAL DEFAULT UND pthread_detach@GLIBC_2.2.5 (3)
192: 0000000000000000 0 FUNC GLOBAL DEFAULT UND pthread_mutex_lock@GLIBC_2.2.5 (3)
195: 0000000000000000 0 FUNC GLOBAL DEFAULT UND pthread_mutexattr_init@GLIBC_2.2.5 (3)
198: 0000000000000000 0 FUNC GLOBAL DEFAULT UND pthread_key_create@GLIBC_2.2.5 (3)
199: 0000000000000000 0 FUNC GLOBAL DEFAULT UND pthread_mutex_destroy@GLIBC_2.2.5 (3)
201: 0000000000000000 0 FUNC GLOBAL DEFAULT UND pthread_cond_broadcast@GLIBC_2.3.2 (4)
207: 0000000000000000 0 FUNC GLOBAL DEFAULT UND pthread_mutex_unlock@GLIBC_2.2.5 (3)
350: 0000000000000000 0 FUNC GLOBAL DEFAULT UND pthread_getspecific@@glib
365: 0000000000000000 0 FUNC GLOBAL DEFAULT UND pthread_cond_destroy@@gli
477: 0000000000000000 0 FUNC GLOBAL DEFAULT UND pthread_mutex_timedlock@@
655: 0000000000000000 0 FUNC GLOBAL DEFAULT UND pthread_setspecific@@glib
830: 0000000000000000 0 FUNC GLOBAL DEFAULT UND pthread_cond_signal@@glib
906: 0000000000000000 0 FUNC GLOBAL DEFAULT UND pthread_mutexattr_destroy
1263: 0000000000000000 0 FUNC GLOBAL DEFAULT UND pthread_cond_timedwait@@g
1389: 0000000000000000 0 FUNC GLOBAL DEFAULT UND pthread_mutex_init@@glibc
1769: 0000000000000000 0 FUNC GLOBAL DEFAULT UND pthread_create@@GLIBC_2.2
1793: 0000000000000000 0 FUNC GLOBAL DEFAULT UND pthread_cond_init@@GLIBC_
1929: 0000000000000000 0 FUNC GLOBAL DEFAULT UND pthread_key_delete@@glibc
2152: 0000000000000000 0 FUNC GLOBAL DEFAULT UND pthread_self@@GLIBC_2.2.5
2173: 0000000000000000 0 FUNC GLOBAL DEFAULT UND pthread_join@@GLIBC_2.2.5
2204: 0000000000000000 0 FUNC GLOBAL DEFAULT UND pthread_mutex_trylock@@gl
2326: 0000000000000000 0 FUNC GLOBAL DEFAULT UND pthread_exit@@GLIBC_2.2.5
2940: 0000000000000000 0 FUNC GLOBAL DEFAULT UND pthread_mutexattr_settype
3258: 0000000000000000 0 FUNC GLOBAL DEFAULT UND pthread_cond_wait@@GLIBC_
3310: 0000000000000000 0 FUNC GLOBAL DEFAULT UND pthread_detach@@GLIBC_2.2
3827: 0000000000000000 0 FUNC GLOBAL DEFAULT UND pthread_mutex_lock@@glibc
3886: 0000000000000000 0 FUNC GLOBAL DEFAULT UND pthread_mutexattr_init@@g
3914: 0000000000000000 0 FUNC GLOBAL DEFAULT UND pthread_key_create@@glibc
3959: 0000000000000000 0 FUNC GLOBAL DEFAULT UND pthread_mutex_destroy@@gl
4010: 0000000000000000 0 FUNC GLOBAL DEFAULT UND pthread_cond_broadcast@@g
4087: 0000000000000000 0 FUNC GLOBAL DEFAULT UND pthread_mutex_unlock@@gli
from ctoy.
Ok, let's try to locate the bug more precisely. Try this two different things :
A: Comment the code inside "ctoy__src_thread_init", does it still crash ?
B: Comment the code inside "ctoy__io_replace", does it still crash ?
I'm wondering if there is not a conflict between tinycthread.h and threads.h with the function name thrd_***. Check that everything is compiled in ANSI-C99 (no C11).
from ctoy.
also getting this, the crash can be preventing by commenting any of:
140: thrd_join(ctoy__src_thread_id, NULL);
146: ctoy__src_thread_destroy();
541: ctoy__src_thread_restart();
do you need to call ctoy__src_thread_restart(); in line 541?
(edit: the live reloading also didn't seem to be working, unless I was doing it wrong)
from ctoy.
Are you also on Arch Linux ?
What version of glibc is it bundled with ?
from ctoy.
yep, 2.26
from ctoy.
It may be caused by a glibc bug : https://sourceware.org/bugzilla/show_bug.cgi?id=20116
from ctoy.
Related Issues (20)
- Issue with my Linux port HOT 1
- Can I opt to remove GLES window? HOT 1
- F*** you! HOT 2
- dyld: Library not loaded: @rpath/libtcc.dylib crash HOT 1
- No documentation? HOT 9
- [Feature Request] Official RaspberryPi Package HOT 29
- Consider replacing OpenAL by mini_al HOT 1
- Add a license HOT 2
- Missing VCOMP140.dll and VCRuntime140.dll HOT 1
- Change when tcc build fail, fallback to previous working copy of program instead of blocking HOT 2
- Add ability to run any source file through a command line option HOT 4
- imgui_hello.c sample undefined symbol HOT 2
- [RFC] A CToy based Linux distro HOT 3
- `libtcc_hello` sample doesn't work as intended HOT 2
- Clarification of project structure for CMake scripts HOT 1
- Feature request: Add compatibility with sokol HOT 8
- vsync control / frame limiting HOT 2
- Compiling on Linux, GLFW Question HOT 4
- Help with CToy HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ctoy.