Hi, >> Hi Mark, > Still Marc, btw.
Please kindly excuse me for the typo. >> Libev provides ev_set_syserr_cb() to customise error handling. >> >> I wonder, if longjump-ing from a error handler is supported. > > libev can't stop you, longjmp is part of the C language. Well, since pointers are part of C language as well, it is technically possible to overwrite arbitrary memory. However, the common understanding is that once you start overwriting arbitrary things all bets are off, i.e. UB. I wonder, if long jump in libev error handler is 1) UB from the libev point of view, or 2) works with certain versions of libev on certain OSes, but may break without warning, or 3) is fully supported and is a part of the public API contract. If it is 1) or 2) we aren’t going to do it. > >> Consider a longjump removing all libev frames from the stack and landing at >> some location that was set up earlier. >> Are we going to get any leaks inside libev? Is that contractual? > > You won't get leaks, but you will likely have a non-working loop > afterwards - nothing legal can be done with it anymore. Can we legally kill it with ev_loop_destroy()? If we can, should we expect that neither memory nor file descriptors will leak? Thanks, Nick _______________________________________________ libev mailing list [email protected] http://lists.schmorp.de/mailman/listinfo/libev
