Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

pl/pgsql segfault #21

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
kelvich opened this issue Aug 22, 2016 · 1 comment
Closed

pl/pgsql segfault #21

kelvich opened this issue Aug 22, 2016 · 1 comment

Comments

@kelvich
Copy link
Contributor

kelvich commented Aug 22, 2016

create or replace function shadowtest(in1 int)
    returns table (out1 int) as $$
declare
in1 int;
out1 int;
begin
end
$$ language plpgsql;
select shadowtest(1);

set plpgsql.extra_warnings to 'shadowed_variables';
select shadowtest(1);
create or replace function shadowtest(in1 int)
    returns table (out1 int) as $$
declare
in1 int;
out1 int;
begin
end
$$ language plpgsql;
select shadowtest(1);
drop function shadowtest(int);
  * frame #0: 0x0000000102243f38 postgres`function_parse_error_transpose(prosrc="\ndeclare\nin1 int;\nout1 int;\nbegin\nend\n") + 72 at pg_proc.c:1012
    frame #1: 0x0000000102b741d0 plpgsql.so`plpgsql_compile_error_callback(arg=0x00007faa9a840830) + 32 at pl_comp.c:934
    frame #2: 0x00000001026b1a27 postgres`errfinish(dummy=0) + 215 at elog.c:438
    frame #3: 0x0000000102b698dd plpgsql.so`plpgsql_yyparse + 6349 at pl_gram.y:742
    frame #4: 0x0000000102b73d3e plpgsql.so`do_compile(fcinfo=0x00007fff5dac7d80, procTup=0x0000000102b37e08, function=0x00007faa9b024210, hashkey=0x00007fff5dac79e8, forValidator='\x01') + 4654 at pl_comp.c:733
    frame #5: 0x0000000102b72839 plpgsql.so`plpgsql_compile(fcinfo=0x00007fff5dac7d80, forValidator='\x01') + 521 at pl_comp.c:222
    frame #6: 0x0000000102b72536 plpgsql.so`plpgsql_validator(fcinfo=0x00007fff5dac8190) + 2326 at pl_handler.c:491
    frame #7: 0x00000001026bdb63 postgres`OidFunctionCall1Coll(functionId=12658, collation=0, arg1=16407) + 163 at fmgr.c:1596
    frame #8: 0x00000001022434bc postgres`ProcedureCreate(procedureName="shadowtest", procNamespace=2200, replace='\x01', returnsSet='\x01', returnType=23, proowner=10, languageObjectId=12659, languageValidator=12658, prosrc="\ndeclare\nin1 int;\nout1 int;\nbegin\nend\n", probin=0x0000000000000000, isAgg='\0', isWindowFunc='\0', security_definer='\0', isLeakProof='\0', isStrict='\0', volatility='v', parallel='u', parameterTypes=0x00007faa9b80acc8, allParameterTypes=140370730069240, parameterModes=140370730069288, parameterNames=140370730069336, parameterDefaults=0x0000000000000000, trftypes=0, proconfig=0, procost=100, prorows=1000) + 8620 at pg_proc.c:728
    frame #9: 0x00000001022f5664 postgres`CreateFunction(stmt=0x00007faa9c0869a8, queryString="RESET SESSION AUTHORIZATION; reset all; SET plpgsql.extra_warnings TO shadowed_variables; create or replace function shadowtest(in1 int)\nreturns table (out1 int) as $$\ndeclare\nin1 int;\nout1 int;\nbegin\nend\n$$ language plpgsql;") + 2660 at functioncmds.c:1083
    frame #10: 0x00000001025224a1 postgres`ProcessUtilitySlow(parsetree=0x00007faa9c0869a8, queryString="RESET SESSION AUTHORIZATION; reset all; SET plpgsql.extra_warnings TO shadowed_variables; create or replace function shadowtest(in1 int)\nreturns table (out1 int) as $$\ndeclare\nin1 int;\nout1 int;\nbegin\nend\n$$ language plpgsql;", context=PROCESS_UTILITY_QUERY, params=0x0000000000000000, dest=0x0000000102866f48, completionTag="") + 5265 at utility.c:1376
    frame #11: 0x0000000102520b64 postgres`standard_ProcessUtility(parsetree=0x00007faa9c0869a8, queryString="RESET SESSION AUTHORIZATION; reset all; SET plpgsql.extra_warnings TO shadowed_variables; create or replace function shadowtest(in1 int)\nreturns table (out1 int) as $$\ndeclare\nin1 int;\nout1 int;\nbegin\nend\n$$ language plpgsql;", context=PROCESS_UTILITY_QUERY, params=0x0000000000000000, dest=0x0000000102866f48, completionTag="") + 3844 at utility.c:907
    frame #12: 0x0000000102d06a47 multimaster.so`MtmProcessUtility(parsetree=0x00007faa9c0869a8, queryString="RESET SESSION AUTHORIZATION; reset all; SET plpgsql.extra_warnings TO shadowed_variables; create or replace function shadowtest(in1 int)\nreturns table (out1 int) as $$\ndeclare\nin1 int;\nout1 int;\nbegin\nend\n$$ language plpgsql;", context=PROCESS_UTILITY_QUERY, params=0x0000000000000000, dest=0x0000000102866f48, completionTag="") + 1207 at multimaster.c:3550
    frame #13: 0x000000010251fc2d postgres`ProcessUtility(parsetree=0x00007faa9c0869a8, queryString="RESET SESSION AUTHORIZATION; reset all; SET plpgsql.extra_warnings TO shadowed_variables; create or replace function shadowtest(in1 int)\nreturns table (out1 int) as $$\ndeclare\nin1 int;\nout1 int;\nbegin\nend\n$$ language plpgsql;", context=PROCESS_UTILITY_QUERY, params=0x0000000000000000, dest=0x0000000102866f48, completionTag="") + 77 at utility.c:332
    frame #14: 0x00000001023a0674 postgres`_SPI_execute_plan(plan=0x00007fff5dac9d18, paramLI=0x0000000000000000, snapshot=0x0000000000000000, crosscheck_snapshot=0x0000000000000000, read_only='\0', fire_triggers='\x01', tcount=0) + 1620 at spi.c:2200
    frame #15: 0x000000010239ff05 postgres`SPI_execute(src="RESET SESSION AUTHORIZATION; reset all; SET plpgsql.extra_warnings TO shadowed_variables; create or replace function shadowtest(in1 int)\nreturns table (out1 int) as $$\ndeclare\nin1 int;\nout1 int;\nbegin\nend\n$$ language plpgsql;", read_only='\0', tcount=0) + 197 at spi.c:387
    frame #16: 0x0000000102d1606c multimaster.so`process_remote_message(s=0x00007fff5dac9e40) + 188 at pglogical_apply.c:366
    frame #17: 0x0000000102d14cc2 multimaster.so`MtmExecutor(id=0, work=0x00007faa9a405a20, size=297) + 1042 at pglogical_apply.c:1039
    frame #18: 0x0000000102d1086d multimaster.so`BgwPoolMainLoop(arg=140370711155584) + 589 at bgwpool.c:57
    frame #19: 0x000000010247530a postgres`StartBackgroundWorker + 826 at bgworker.c:726
    frame #20: 0x000000010248aab0 postgres`do_start_bgworker(rw=0x00007faa9a601a60) + 240 at postmaster.c:5531
    frame #21: 0x0000000102485d1b postgres`maybe_start_bgworker + 427 at postmaster.c:5706
    frame #22: 0x000000010248624e postgres`ServerLoop + 1198 at postmaster.c:1762
    frame #23: 0x0000000102483ca9 postgres`PostmasterMain(argc=3, argv=0x00007faa9a403900) + 5897 at postmaster.c:1298
    frame #24: 0x00000001023bd60f postgres`main(argc=3, argv=0x00007faa9a403900) + 751 at main.c:228
    frame #25: 0x00007fff8b9b15ad libdyld.dylib`start + 1
@kelvich kelvich added the bug label Aug 22, 2016
@kelvich
Copy link
Contributor Author

kelvich commented Aug 22, 2016

Same problem with rangefunc.sql test

@kelvich kelvich modified the milestone: 1.0.0 Sep 8, 2016
kelvich pushed a commit that referenced this issue Nov 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant