7.1 devel and initdb core dumps

From: "Jarmo Paavilainen" <netletter(at)comder(dot)com>
To: "PostgreSQL General" <pgsql-general(at)hub(dot)org>
Subject: 7.1 devel and initdb core dumps
Date: 2000-10-17 18:21:09
Message-ID: 009401c03867$05f1e620$1501a8c0@theboss.comder.private
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Browse pgsql-general by date

  From Date Subject
Next Message Peter Mount 2000-10-17 18:28:59 Re: Change to DatabaseMetaData.java for the jdbc2 driver (fwd)
Previous Message Frank Bax 2000-10-17 17:46:05 Re: OpenBSD startup - logfile?