Re: BUG #17561: Server crashes on executing row() with very long argument list

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: kyzevan23(at)mail(dot)ru, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #17561: Server crashes on executing row() with very long argument list
Date: 2022-07-29 10:14:11
Message-ID: 20220729101411.7b45rvhlrsgcajjo@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On 2022-Jul-29, PG Bug reporting form wrote:

> When executing the following query:
> (echo "SELECT row("; for ((i=1;i<100001;i++)); do echo "'$i',$i,"; done;
> echo "'0',0);"; ) | psql
> I got server crash with the following backtrace
...
> #5 0x0000557e1694f850 in ExceptionalCondition
> (conditionName=conditionName(at)entry=0x557e169b2e62 "attributeNumber >= 1",
> errorType=errorType(at)entry=0x557e169b0e7f "BadArgument",
> fileName=fileName(at)entry=0x557e169b2d7c "tupdesc.c",
> lineNumber=lineNumber(at)entry=598) at assert.c:69
> #6 0x0000557e1642790a in TupleDescInitEntry
> (desc=desc(at)entry=0x7f42a4c8b050,
> attributeNumber=attributeNumber(at)entry=-32768,
> attributeName=attributeName(at)entry=0x0, oidtypeid=23, typmod=typmod(at)entry=-1,
> attdim=attdim(at)entry=0)
> at tupdesc.c:598
> #7 0x0000557e1664c509 in ExecTypeFromExprList (exprList=0x7f42a7830cf0) at
> execTuples.c:2009

Hah, of course. I suppose we'd need something like this ... haven't
looked for other problem spots.

--
Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/

Attachment Content-Type Size
overflow.patch text/x-diff 514 bytes

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Richard Guo 2022-07-29 10:30:01 Re: BUG #17560: Planner can not find plan with lowest cost
Previous Message Francisco Olarte 2022-07-29 09:56:13 Re: BUG #17561: Server crashes on executing row() with very long argument list