saygoodbyye opened a new issue, #2093:
URL: https://github.com/apache/age/issues/2093

   **Describe the bug**
   Server crashes when executing the following SQL-script
   
   **How are you accessing AGE (Command line, driver, etc.)?**
   Accessing AGE through command line.
   
   **What data setup do we need to do?**
   Apache AGE (master) with PostgreSQL (REL_16_STABLE).
   
   **What is the necessary configuration info needed?**
   My PostgreSQL configuration:
   ```
   ./configure CFLAGS=" -Og" --enable-tap-tests --enable-debug --enable-cassert
   ```
   
   **What is the command that caused the error?**
   ```pgsql
   create extension age;
   SET search_path TO ag_catalog;
   SELECT agtype_access_operator(agtype_in('[null, null]'));
   SELECT agtype_hash_cmp(agtype_in('[null, null, null, null, null]'));
   ```
   backtrace:
   ```c
   #0  GetMemoryChunkMethodID (pointer=pointer@entry=0x0) at mcxt.c:196
   196          header = *((const uint64 *) ((const char *) pointer - 
sizeof(uint64)));
   (gdb) bt
   #0  GetMemoryChunkMethodID (pointer=pointer@entry=0x0) at mcxt.c:196
   #1  0x00006331d5ae9b8c in pfree (pointer=0x0) at mcxt.c:1463
   #2  0x00007954f6abec67 in agtype_access_operator (fcinfo=0x6331d7180f48) at 
src/backend/utils/adt/agtype.c:4075
   #3  0x00006331d57aa0db in ExecInterpExpr (state=0x6331d7180e68, 
econtext=0x6331d7181078, isnull=0x7ffef139e144) at execExprInterp.c:758
   #4  0x00006331d57a6bb0 in ExecInterpExprStillValid (state=0x6331d7180e68, 
econtext=0x6331d7181078, isNull=0x7ffef139e144) at execExprInterp.c:1870
   #5  0x00006331d58b6952 in ExecEvalExprSwitchContext (isNull=0x7ffef139e144, 
econtext=<optimized out>, state=0x6331d7180e68) at 
../../../../src/include/executor/executor.h:355
   #6  evaluate_expr (expr=<optimized out>, 
result_type=result_type@entry=16453, result_typmod=result_typmod@entry=-1, 
result_collation=result_collation@entry=0) at clauses.c:4979
   #7  0x00006331d58b6b2e in evaluate_function (funcid=funcid@entry=16787, 
result_type=result_type@entry=16453, result_typmod=result_typmod@entry=-1,
       result_collid=result_collid@entry=0, input_collid=input_collid@entry=0, 
args=args@entry=0x6331d717e850, funcvariadic=true, func_tuple=0x7954f65e5e30, 
context=0x7ffef139e530)
       at clauses.c:4485
   #8  0x00006331d58b8bf4 in simplify_function (funcid=16787, 
result_type=16453, result_typmod=-1, result_collid=result_collid@entry=0, 
input_collid=input_collid@entry=0,
       args_p=args_p@entry=0x7ffef139e330, funcvariadic=true, 
process_args=true, allow_non_const=true, context=0x7ffef139e530) at 
clauses.c:4074
   #9  0x00006331d58b6e4a in eval_const_expressions_mutator 
(node=0x6331d70aabf0, context=0x7ffef139e530) at clauses.c:2573
   #10 0x00006331d5828cf5 in expression_tree_mutator_impl 
(node=node@entry=0x6331d70aac40, mutator=mutator@entry=0x6331d58b6b70 
<eval_const_expressions_mutator>,
       context=context@entry=0x7ffef139e530) at nodeFuncs.c:3302
   #11 0x00006331d58b6bf0 in eval_const_expressions_mutator 
(node=0x6331d70aac40, context=0x7ffef139e530) at clauses.c:3693
   #12 0x00006331d5828f07 in expression_tree_mutator_impl 
(node=node@entry=0x6331d70aac90, mutator=mutator@entry=0x6331d58b6b70 
<eval_const_expressions_mutator>,
       context=context@entry=0x7ffef139e530) at nodeFuncs.c:3389
   #13 0x00006331d58b6bf0 in eval_const_expressions_mutator 
(node=0x6331d70aac90, context=context@entry=0x7ffef139e530) at clauses.c:3693
   #14 0x00006331d58b8213 in eval_const_expressions 
(root=root@entry=0x6331d717e088, node=<optimized out>) at clauses.c:2249
   #15 0x00006331d58990be in preprocess_expression 
(root=root@entry=0x6331d717e088, expr=<optimized out>, kind=kind@entry=1) at 
planner.c:1144
   #16 0x00006331d58a0e3e in subquery_planner (glob=glob@entry=0x6331d70a9e90, 
parse=parse@entry=0x6331d70a9fa0, parent_root=parent_root@entry=0x0,
       hasRecursion=hasRecursion@entry=false, 
tuple_fraction=tuple_fraction@entry=0) at planner.c:811
   #17 0x00006331d58a1a07 in standard_planner (parse=0x6331d70a9fa0, 
query_string=<optimized out>, cursorOptions=2048, boundParams=<optimized out>) 
at planner.c:413
   #18 0x00006331d58a1fc9 in planner (parse=parse@entry=0x6331d70a9fa0, 
query_string=query_string@entry=0x6331d70a8f98 "SELECT 
agtype_access_operator(agtype_in('[null, null]'));",
       cursorOptions=cursorOptions@entry=2048, 
boundParams=boundParams@entry=0x0) at planner.c:281
   #19 0x00006331d598181c in pg_plan_query 
(querytree=querytree@entry=0x6331d70a9fa0,
       query_string=query_string@entry=0x6331d70a8f98 "SELECT 
agtype_access_operator(agtype_in('[null, null]'));", 
cursorOptions=cursorOptions@entry=2048,
       boundParams=boundParams@entry=0x0) at postgres.c:908
   #20 0x00006331d59818d2 in pg_plan_queries (querytrees=0x6331d70aad60, 
query_string=query_string@entry=0x6331d70a8f98 "SELECT 
agtype_access_operator(agtype_in('[null, null]'));",
       cursorOptions=cursorOptions@entry=2048, 
boundParams=boundParams@entry=0x0) at postgres.c:1000
   #21 0x00006331d5981d3b in exec_simple_query 
(query_string=query_string@entry=0x6331d70a8f98 "SELECT 
agtype_access_operator(agtype_in('[null, null]'));") at postgres.c:1197
   #22 0x00006331d5983c76 in PostgresMain (dbname=<optimized out>, 
username=<optimized out>) at postgres.c:4701
   #23 0x00006331d58e59f2 in BackendRun (port=port@entry=0x6331d70d3740) at 
postmaster.c:4464
   #24 0x00006331d58e7a0a in BackendStartup (port=port@entry=0x6331d70d3740) at 
postmaster.c:4192
   #25 0x00006331d58e7ba8 in ServerLoop () at postmaster.c:1782
   #26 0x00006331d58e90e4 in PostmasterMain (argc=argc@entry=3, 
argv=argv@entry=0x6331d7062fe0) at postmaster.c:1466
   #27 0x00006331d580dbef in main (argc=3, argv=0x6331d7062fe0) at main.c:198
   ```
   
   **Expected behavior**
   Expected ERROR to be shown or sql query to be successfully executed
   
   Best regards,
   Egor Chindyaskin
   Postgres Professional: https://postgrespro.com/


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@age.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to