found another overrun

Поиск
Список
Период
Сортировка
От Maurice Gittens
Тема found another overrun
Дата
Msg-id 199803291233.OAA25342@david.gits.nl
обсуждение исходный текст
Ответы Re: [HACKERS] found another overrun  (Bruce Momjian <maillist@candle.pha.pa.us>)
Список pgsql-hackers
Hi,
This simple patch to catalog/pg_type.c fixes a buffer overrun.
It was detected by Electric Fence and triggered by statements like:

    SELECT * into table t from pg_database;

The system would crash on a memmove call in DataFile() with arguments like this:

    memmove(0x0, 0x0, 0);

Here's the patch.

320a321
>     NameData         name;
390c391,392
<     values[i++] = PointerGetDatum(typeName);    /* 1 */
---
>     namestrcpy(&name,typeName);
>     values[i++] = NameGetDatum(&name);    /* 1 */

After applying the patch the problem goes away.

I'll try to make all the buffer overruns detected by Electric Fence
during the regression test on my Linux system go away -:).
Debugging is a nice way to learn about a system isn't it?

With regards from Maurice.


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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: (PM) Re: [HACKERS] Ways to crash the backend
Следующее
От: Michal Mosiewicz
Дата:
Сообщение: Re: [HACKERS] Optimizer fails?