To summarize [Was: Feature request: optionally compile with support for exceptions]

Hi there,
it looks like I was not very successful in explaining why we absolutely need GMP to be compiled with exception support (and, in the long run, to be exception-safe). Absolutely means that we have only two choices:
1) we work with the GMP people to get this done in a way that satisfies everybody; or 2) we distribute our own patched version of the GMP (sources and binaries).
If at all possible, we want to avoid 2, but we need to know whether the GMP people is available for alternative 1. All the best,
Roberto
P.S. You can learn more about one of the projects where the functionality we require is needed at http://www.cs.unipr.it/ppl/

Roberto Bagnara bagnara@cs.unipr.it writes:
it looks like I was not very successful in explaining why we absolutely need GMP to be compiled with exception support (and, in the long run, to be exception-safe).
Throwing exceptions from the mp_set_memory_functions routines is not currently supported, and probably leaks memory and leaves variables in inconsistent states (which you mentioned before perhaps).
The situation might not quite be as bad as it seems, since all allocations will have gone through those memory functions, so perhaps that provides a means to clean up. Depends on the intended use I guess.
Exceptions from divide-by-zero or sqrt-of-negative might be more hopeful, since those things at least can be (or ought to be) tested at the start of relevant gmp routines. Currently a deliberate "int" divide-by-zero is induced, so it might work to catch SIGFPE or the like, on those chips which raise that.
participants (2)
-
Kevin Ryde
-
Roberto Bagnara