From: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
---|---|
To: | Junseok Yang <jsyang(at)bitnine(dot)net> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: `array_position...()` causes SIGSEGV |
Date: | 2016-12-09 15:46:04 |
Message-ID: | 20161209154604.qopgvldhf4pekglq@alvherre.pgsql |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Junseok Yang wrote:
> Hello hackers,
>
> I met SIGSEGV when using `array_position()` with record type
> arguments, so I've written a patch which corrects this problem. It
> seems that `array_position...()` sets wrong memory context for the
> cached function (in this case `record_eq()`) which is used to find a
> matching element.
Looks correct to me, so pushed to all affected branches.
> The problem is reproducable with the following query.
>
> SELECT array_position(ids, (1, 1))
> FROM (VALUES (ARRAY[(0, 0)]), (ARRAY[(1, 1)])) AS _(ids);
I used this as a new regression test.
Thanks for the report and patch!
--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Dave Cramer | 2016-12-09 15:49:35 | Re: building HEAD on macos fails with #error no source of random numbers configured |
Previous Message | Tom Lane | 2016-12-09 15:43:24 | Re: building HEAD on macos fails with #error no source of random numbers configured |