lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

Quoting Jerome Vuarand <>:

> Javier Guerra Giraldez wrote:
> > does TCC still have that nasty bug where releasing a second context
> > breaks all hell loose? 
> I don't think so, since I used to load several C source modules in the same
> app and the luatcc loader creates a new context for each module it loads.
> OTOH I haven't done extensive testing of that aspect. I'll add a test case 
> the package to verify that.

in my first attempts on lua-tcc, i wanted to let the user manage the C 
context, but soon found that if you create two or more contexts, the first 
release succeeds, but the second one fails with a 'free'd twice' error.  
digging through the TCC list archives, i found that it's a known bug, and 
Fabrice isn't interested in hacking TCC anymore.

to limit damage, i simplified lua-tcc user API so that you can't mess with the 
C contexts, and they're never released (ugh).  in the end, it's nice for 
tests, but not for heavy usage.