7.1 devel and initdb core dumps

Поиск
Список
Период
Сортировка
От Jarmo Paavilainen
Тема 7.1 devel and initdb core dumps
Дата
Msg-id 009401c03867$05f1e620$1501a8c0@theboss.comder.private
обсуждение исходный текст
Список pgsql-general
Hi,

I think the subject says it all ("7.1 devel and initdb core dumps").

But the fun (?) part is that it works on my work HW (Intel Pii 450 with
256MByte) while it crashes on my test machine (P90MHz with 48 MByte). Other
that the obvious diff they are the same (Redhat 6.0 almost out of the box).
The software compiled on the HW that uses it (copied through a local CVS).

And then to something else, whats wrong with this:

...
    nstr = palloc(len = strlen(string) + 1);
    memcpy(nstr, string, len);

If I wrote it that way postgres gave me an assert (prob. when it freed the
memory), but this worked:

...
    len = strlen(string) + 1;
    nstr = palloc( len+1 ); //    Note the extra space
    memcpy(nstr, string, len);

"nstr" was used as a constant, so it was never changed after the
memcpy(...). I find it odd, very odd.

// Jarmo


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: vacuums failing
Следующее
От: "Enrico Comini"
Дата:
Сообщение: DOUBLE MESSAGE