Re: Looking for someone with MinGW
От | ITAGAKI Takahiro |
---|---|
Тема | Re: Looking for someone with MinGW |
Дата | |
Msg-id | 20081217112347.8A3F.52131E4D@oss.ntt.co.jp обсуждение исходный текст |
Ответ на | Re: Looking for someone with MinGW (Andrew Dunstan <andrew@dunslane.net>) |
Ответы |
Re: Looking for someone with MinGW
Re: Looking for someone with MinGW |
Список | pgsql-hackers |
Andrew Dunstan <andrew@dunslane.net> wrote: > > Thanks. The backtrace is kind of strange, but I might have found it. > > Could you please update from CVS and re-run? > > same result ;-( Hi, I found the cause. Segfault comes from the following lines. [ecpg/test/connect/test1.pgc] exec sql connect to tcp:postgresql://localhost/ user connectdb; exec sql disconnect; -> ECPGdisconnect() -> ecpg_finish() -> ecpg_log("ecpg_finish: connection %s closed\n", act->name); <HERE> -> vfprintf(debugstream, fmt, ap); Actual error occurs in vfprintf() because act->name can be NULL. sprintf(..., "%s", NULL) could work on some platform (the result is '(null)'), but it crashes on Windows (msvcrt). We need to avoid passing NULLs as arguments to "%s" format for printf families. The attached patch fixes the segfault. Regression tests can finish successfully but there is still a difference. The diff seems to be trivial and come from error message changes. Regards, --- ITAGAKI Takahiro NTT Open Source Software Center
Вложения
В списке pgsql-hackers по дате отправления: