libgap: what data in the libgap-calling functions must be declared volatile? other pitfalls? #2893
Labels
kind: discussion
discussions, questions, requests for comments, and so on
topic: libgap
things related to libgap
My libgap-calling code manages to cause infinite recursion in
PRINT_OR_APPEND_TO_STREAM
: it cannot openstream
, tries toErrorQuit
few lines later,ErrorQuit
in turns callPRINT_OR_APPEND_TO_STREAM
, again it cannot open the stream, etc etc.The (long) code causing this is here - I probably can produce a reasonably short C code illustrating this (by design, it does call libgap with quite a few invalid inputs, causing errors and processing them in a callback), but I'd rather try to fix things first...
While this potential infinite recursion in itself is a sort of bug in (lib)gap, could it be that my code violates some unwritten rules, e.g. does not use
volatile
for some data that needs it? Other pitfalls of this sort?Would it matter if the caller is multi-threaded (which is the case for me) and calls libgap in different threads?
The text was updated successfully, but these errors were encountered: