Re: crash bug on closed connection

Поиск
Список
Период
Сортировка
От Inoue, Hiroshi
Тема Re: crash bug on closed connection
Дата
Msg-id 543EC9BA.1020901@tpf.co.jp
обсуждение исходный текст
Ответ на Re: crash bug on closed connection  (Jade Koskela <jkoskela0@gmail.com>)
Ответы Re: crash bug on closed connection  ("Inoue, Hiroshi" <inoue@tpf.co.jp>)
Список pgsql-odbc
Hi Jade,

Could you please try the attached patch?

regards,
Hiroshi Inoue

On 2014/10/15 14:38, Jade Koskela wrote:
> Here is the end of the log.
> I've done some debugging, when CC_send_query_append is called here, it
> correctly identifies that there was an error, and exits the function.
>
> res = CC_send_query_append(conn, self->stmt_with_params, qryi, qflag,
> SC_get_ancestor(self), appendq); (statement.c:2069)
>
> The result which is returned is not handled correctly (statement.c:2078)
>
> if (appendq)
> {
>      QResultClass    *qres, *nres;
>
>      if ( res->rstatus == PORES_EMPTY_QUERY && !res->next)
>          res = NULL;
>
>      for (qres = res; qres;)
>      {
>          if (qres->command && strnicmp(qres->command, fetch_cmd, 5) == 0)
>          {
>              res = qres;
>              break;
>          }
>          nres = qres->next;
>          if (nres && QR_get_notice(qres) != NULL)
>          {
>              if (QR_command_successful(nres) &&
>                  QR_command_nonfatal(qres))
>              {
>                  QR_set_rstatus(nres, PORES_NONFATAL_ERROR);
>              }
>              QR_add_notice(nres, QR_get_notice(qres));
>          }
>          qres->next = NULL;
>          QR_Destructor(qres);
>          qres = nres;
>      }
> }
>
> There is only a single result, with result.next == NULL.
> This part of the code calls the destructor on the only result, but res
> is still left pointing at it. After that fun things happen.
> It gets a long way before it actually crashes in
> Exec_with_parameters_resolved.

Вложения

В списке pgsql-odbc по дате отправления:

Предыдущее
От: Bala krishna Devasani
Дата:
Сообщение: PostgreSQL crash at SQLColAttribute()
Следующее
От: "Inoue, Hiroshi"
Дата:
Сообщение: Re: crash bug on closed connection