Skip site navigation (1) Skip section navigation (2)

Re: points and boxes - core dump

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Ewald Geschwinde <webmaster(at)geschwinde(dot)net>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: points and boxes - core dump
Date: 2002-05-14 15:43:34
Message-ID: 26504.1021391014@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-bugs
Ewald Geschwinde <webmaster(at)geschwinde(dot)net> writes:
> When using the field koord instead of a static box the system will core
> dump:

Hmm, I get garbage answers for the second and later rows, rather than
a core dump.

> Does anybody have an idea why the problem occurs?

I think the guilty party is the pfree() in dist_pb.  Given this set of
data close_pb will return its input Point pointer, so the net result is
dist_pb tries to pfree the supplied constant.  A bad move :-(.

I am strongly inclined to rip out *all* the pfrees of someone else's
result in geo_ops.c, not only that one.  Given the current handling of
memory management they are a waste of cycles and code space, and after
seeing this example I am not inclined to trust them not to be pfreeing
something they shouldn't.

			regards, tom lane

In response to

Responses

pgsql-bugs by date

Next:From: Tom LaneDate: 2002-05-14 17:50:52
Subject: Re: points and boxes - core dump
Previous:From: Hannu KrosingDate: 2002-05-14 13:40:38
Subject: Re: [HACKERS] Bug #659: lower()/upper() bug on

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group