Branch: Tag:

2018-05-17

2018-05-17 14:09:45 by Stephen R. van den Berg <srb@cuci.nl>

pgsql: Guard against async destructs.

1684:    return local_backend->call_out(gottimeout, timeout);    }    -  inline void scuttletimeout(array cid) { +  inline private void scuttletimeout(array cid) {    if (local_backend)    local_backend->remove_call_out(cid);    }
1707:    PD("%O Block for datarow\n", _portalname);    array cid = setuptimeout();    PT(datarow = datarows->read()); +  if (!this) // If object already destructed, return fast +  return 0;    scuttletimeout(cid);    if (arrayp(datarow))    return datarow;
1734:    if (!sizeof(datarow)) {    array cid = setuptimeout();    PT(datarow = datarows->read_array()); +  if (!this) // If object already destructed, return fast +  return 0;    scuttletimeout(cid);    }    replenishrows();
1777:    for (;;) {    array cid = setuptimeout();    PT(datarow = datarows->read()); +  if (!this) // If object already destructed, return fast +  return 0;    scuttletimeout(cid);    if (!arrayp(datarow))    break;
1806:    for (;;) {    array cid = setuptimeout();    PT(datarow = datarows->read_array()); +  if (!this) // If object already destructed, return fast +  return 0;    scuttletimeout(cid);    if (!datarow || !arrayp(datarow[-1]))    break;