Skip to content
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

Problems with requests of procedure's parameters [CORE2956] #3338

Closed
firebird-issue-importer opened this issue Apr 2, 2010 · 6 comments
Closed

Comments

@firebird-issue-importer
Copy link

@firebird-issue-importer firebird-issue-importer commented Apr 2, 2010

Submitted by: @AlexPeshkoff

In parse_param_blr() function in jrd/met.epp pointers to requests of all parameters (one after one) are placed into same place - procedure->prc_request. Later request of procedure itself is placed to the same place. I see the following problems with it:

1. Looks like that requests will never be released.
2. In case of error in parse_procedure_blr() prc_request is explicitly released and NULLed, with parse_param_blr() - not.
3. That request is kept is prc_request field in case of any failure compiling procedure. Later it can be attempted to be released when parse_procedure_blr() fails. And looks like this can be a cause of segfault:

Program terminated with signal 11, Segmentation fault.
#⁠0  LCK_release (tdbb=0x7fb1770490d0, lock=0x7fb16d5d18f0) at ../src/jrd/lck.cpp:1401
   in ../src/jrd/lck.cpp

#⁠0  LCK_release (tdbb=0x7fb1770490d0, lock=0x7fb16d5d18f0) at ../src/jrd/lck.cpp:1401
#⁠1  0x00007fb179611d29 in CMP_release (tdbb=0x7fb1770490d0, request=0x7fb16d572010) at ../src/jrd/cmp.cpp:2440
#⁠2  0x00007fb1795adb96 in MET_procedure (tdbb=0x7fb1770490d0, id=<value optimized out>, noscan=false, flags=8)
   at ../temp/std/jrd/met.cpp:5001
#⁠3  0x00007fb1795ae730 in MET_lookup_procedure (tdbb=0x7fb1770490d0, name=<value optimized out>, noscan=false)
   at ../temp/std/jrd/met.cpp:3972

Commits: 6be6d3c 209b003 bef8ae7

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Apr 2, 2010

Modified by: @AlexPeshkoff

assignee: Vlad Khorsun [ hvlad ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Apr 2, 2010

Commented by: @dyemanov

IIRC, I avoided this crappy code for PSQL functions, see how prm_default_value is handled in Function.epp.

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Apr 13, 2010

Modified by: @hvlad

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

Fix Version: 2.5 RC3 [ 10381 ]

Fix Version: 3.0 Alpha 1 [ 10331 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Apr 13, 2010

Modified by: @hvlad

Fix Version: 2.1.4 [ 10361 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Feb 4, 2011

Modified by: @pcisar

status: Resolved [ 5 ] => Closed [ 6 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jul 28, 2015

Modified by: @pavel-zotov

status: Closed [ 6 ] => Closed [ 6 ]

QA Status: Cannot be tested

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants