Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using a speedtable shared library from two interpreters in the same process leads to a crash #57

Open
lehenbauer opened this issue Apr 28, 2016 · 1 comment

Comments

@lehenbauer
Copy link
Collaborator

All the field names get created as static Tcl_Objs, plus an array of pointers to all the field names plus a default empty string object and a null value object. This causes the objects to get used between the two interprteters, which is a no-no, and will lead to objects getting freed that are still in use by the other interpreter and probably other stuff, resulting in a crash.

These statics need to be bundled up into a struct, allocated and initialized per interpreter and associated with the interpreter using Tcl_SetAssocData and referenced from the interpreter using Tcl_GetAssocData.

This'll be tricky.

@bovine
Copy link
Member

bovine commented Jun 28, 2016

Is this what the multiterp branch intends to fix?
https://github.com/flightaware/speedtables/tree/multiterp

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants