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-automations opened this issue Apr 2, 2010 · 6 comments
Closed

Comments

@firebird-automations
Copy link
Collaborator

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-automations
Copy link
Collaborator Author

Modified by: @AlexPeshkoff

assignee: Vlad Khorsun [ hvlad ]

@firebird-automations
Copy link
Collaborator Author

Commented by: @dyemanov

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

@firebird-automations
Copy link
Collaborator Author

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-automations
Copy link
Collaborator Author

Modified by: @hvlad

Fix Version: 2.1.4 [ 10361 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

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

@firebird-automations
Copy link
Collaborator Author

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
Development

No branches or pull requests

2 participants