From: | "a(dot)kozhemyakin" <a(dot)kozhemyakin(at)postgrespro(dot)ru> |
---|---|
To: | pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | pltcl crashes due to a syntax error |
Date: | 2024-06-01 04:36:18 |
Message-ID: | 6a2a1c40-2b2c-4a33-8b72-243c0766fcda@postgrespro.ru |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hello hackers,
When executing the following query on master branch:
CREATE EXTENSION pltcl;
CREATE or replace PROCEDURE test_proc5(INOUT a text)
LANGUAGE pltcl
AS $$
set aa [concat $1 "+" $1]
return [list $aa $aa])
$$;
CALL test_proc5('abc');
CREATE EXTENSION
CREATE PROCEDURE
server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.
The connection to the server was lost. Attempting reset: Failed.
The connection to the server was lost. Attempting reset: Failed.
Core was generated by `postgres: postgres postgres [loca'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 __strlen_sse2 () at ../sysdeps/x86_64/multiarch/strlen-sse2.S:142
142 ../sysdeps/x86_64/multiarch/strlen-sse2.S: No such file or
directory.
(gdb) bt
#0 __strlen_sse2 () at ../sysdeps/x86_64/multiarch/strlen-sse2.S:142
#1 0x00007f5f1353ba6a in utf_u2e (src=0x0) at pltcl.c:77
#2 0x00007f5f1353c9f7 in throw_tcl_error (interp=0x55ec24bdaf70,
proname=0x55ec24b6b140 "test_proc5") at pltcl.c:1373
#3 0x00007f5f1353ed64 in pltcl_func_handler
(fcinfo=fcinfo(at)entry=0x7ffdbfb407a0,
call_state=call_state(at)entry=0x7ffdbfb405d0,
pltrusted=pltrusted(at)entry=true) at pltcl.c:1029
#4 0x00007f5f1353ee8d in pltcl_handler (fcinfo=0x7ffdbfb407a0,
pltrusted=pltrusted(at)entry=true) at pltcl.c:765
#5 0x00007f5f1353f1ef in pltcl_call_handler (fcinfo=<optimized out>) at
pltcl.c:698
#6 0x000055ec239ec64a in ExecuteCallStmt
(stmt=stmt(at)entry=0x55ec24a9a940, params=params(at)entry=0x0,
atomic=atomic(at)entry=false, dest=dest(at)entry=0x55ec24a6ea18) at
functioncmds.c:2285
#7 0x000055ec23c103a7 in standard_ProcessUtility (pstmt=0x55ec24a9a9d8,
queryString=0x55ec24a99e68 "CALL test_proc5('abc');",
readOnlyTree=<optimized out>, context=PROCESS_UTILITY_TOPLEVEL,
params=0x0, queryEnv=0x0, dest=0x55ec24a6ea18,
qc=0x7ffdbfb40f40) at utility.c:851
#8 0x000055ec23c1081b in ProcessUtility
(pstmt=pstmt(at)entry=0x55ec24a9a9d8, queryString=<optimized out>,
readOnlyTree=<optimized out>,
context=context(at)entry=PROCESS_UTILITY_TOPLEVEL, params=<optimized out>,
queryEnv=<optimized out>,
dest=0x55ec24a6ea18, qc=0x7ffdbfb40f40) at utility.c:523
#9 0x000055ec23c0e04e in PortalRunUtility
(portal=portal(at)entry=0x55ec24b18108, pstmt=0x55ec24a9a9d8,
isTopLevel=isTopLevel(at)entry=true,
setHoldSnapshot=setHoldSnapshot(at)entry=true,
dest=dest(at)entry=0x55ec24a6ea18, qc=qc(at)entry=0x7ffdbfb40f40)
at pquery.c:1158
#10 0x000055ec23c0e3b7 in FillPortalStore
(portal=portal(at)entry=0x55ec24b18108, isTopLevel=isTopLevel(at)entry=true)
at pquery.c:1031
#11 0x000055ec23c0e6ee in PortalRun (portal=portal(at)entry=0x55ec24b18108,
count=count(at)entry=9223372036854775807, isTopLevel=isTopLevel(at)entry=true,
run_once=run_once(at)entry=true, dest=dest(at)entry=0x55ec24a9aec8,
altdest=altdest(at)entry=0x55ec24a9aec8,
qc=0x7ffdbfb41130) at pquery.c:763
#12 0x000055ec23c0acca in exec_simple_query
(query_string=query_string(at)entry=0x55ec24a99e68 "CALL
test_proc5('abc');") at postgres.c:1274
#13 0x000055ec23c0caad in PostgresMain (dbname=<optimized out>,
username=<optimized out>) at postgres.c:4680
#14 0x000055ec23c0687a in BackendMain (startup_data=<optimized out>,
startup_data_len=<optimized out>) at backend_startup.c:105
#15 0x000055ec23b766bf in postmaster_child_launch
(child_type=child_type(at)entry=B_BACKEND,
startup_data=startup_data(at)entry=0x7ffdbfb41354 "",
startup_data_len=startup_data_len(at)entry=4,
client_sock=client_sock(at)entry=0x7ffdbfb41390)
at launch_backend.c:265
#16 0x000055ec23b7ab36 in BackendStartup
(client_sock=client_sock(at)entry=0x7ffdbfb41390) at postmaster.c:3593
#17 0x000055ec23b7adb0 in ServerLoop () at postmaster.c:1674
#18 0x000055ec23b7c20c in PostmasterMain (argc=argc(at)entry=3,
argv=argv(at)entry=0x55ec24a54030) at postmaster.c:1372
#19 0x000055ec23aacf9f in main (argc=3, argv=0x55ec24a54030) at main.c:197
From | Date | Subject | |
---|---|---|---|
Next Message | Alexander Lakhin | 2024-06-01 08:00:00 | Re: ResourceOwner refactoring |
Previous Message | Michael Paquier | 2024-06-01 00:55:25 | Re: Add memory context type to pg_backend_memory_contexts view |