On 2015-09-10 01:01, Miller Puckette wrote:
I'm not sure this is a real problem - _anything and _list methods simply aren't guaranteed anything about the "s" argument - it shouldn't ever be dereferenced.
oha.
#1 why do we have the "s" argument in the first place? #2 shouldn't there be a huge blinking sign in m_pd.h that warns against it's use?
#3 i see that the "s" argument (to the _anything method) is *used* in Pd-code, though hardly ever dereferenced (notable exception being print_anything()) - am i just nitpicking?
in any case: the problem really was found from a crasher-bug triggered by zexy's [relay] object. (and object similar to [route] but without stripping the selector). [relay] doesn't do any dereferencing of the "s" argument. however, it passes the "s" argument on to outlet_anything(), which will then crash Pd's message dispatcher.
so to revert the question: is the Pd-dispatcher 'guaranteed anything about the "s" argument' in the outlet_list() and outlet_anything() methods?
if not, then the 0002-gracefully-handle-messages-with-NIL-selector.patch (attached to the ticket) will fix it (however, it doesn't fix the buggy [print] object that dereferences the "s" argument in its _anything() method.
fgmasdr IOhannes