Re: Improve pg_re_throw: check if sigjmp_buf is valid and report error
От | Tom Lane |
---|---|
Тема | Re: Improve pg_re_throw: check if sigjmp_buf is valid and report error |
Дата | |
Msg-id | 1461089.1724125443@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: Improve pg_re_throw: check if sigjmp_buf is valid and report error (Xiaoran Wang <fanfuxiaoran@gmail.com>) |
Ответы |
Re: Improve pg_re_throw: check if sigjmp_buf is valid and report error
|
Список | pgsql-hackers |
Xiaoran Wang <fanfuxiaoran@gmail.com> writes: >> Yeah, that's the big problem. I don't have any confidence at all >> that this would detect misuse. It'd require that the old stack >> frame gets overwritten, which might not happen for a long time, >> and it'd require that somebody eventually do a longjmp, which again >> might not happen for a long time --- and when those did happen, the >> error would be detected in someplace far away from the actual bug, >> with little evidence remaining to help you localize it. > Exactly, it cannot tell you which PG_TRY left the invalid sigjmp_buf, > but to implement that is easy I think, recording the line num maybe. I don't think you get to assume that the canary word gets overwritten but debug data a few bytes away survives. regards, tom lane
В списке pgsql-hackers по дате отправления: