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

lpad and rpad from ib_udf may hang consuming 100% CPU [CORE274] #605

Closed
firebird-automations opened this issue Sep 19, 2004 · 3 comments
Closed

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: Claudio Valderrama C. (robocop)

Assigned to: Claudio Valderrama C. (robocop)

SFID: 1030572#⁠
Submitted By: robocop

The functions IB_UDF_lpad and IB_UDF_rpad declared in
ib_udf.sql as lpad and rpad respectively will enter an
infinite loop if the last parameter (pad char) is ''
(empty string, two consecutive single quotes) or NULL
(interpreted as an empty string), making the owner
process (fbserver) consume 100% CPU. Despite the udf is
in an endless loop, if the server runs as an
application, it's possible to shutdown it from the tray.

The cause is flawed logic in the code of the two
external functions.

@firebird-automations
Copy link
Collaborator Author

Commented by: Alice F. Bird (firebirds)

Date: 2004-10-09 06:02
Sender: robocop
Logged In: YES
user_id=62823

Fixed in the new version of the library, ib_udf.cpp.

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

Workflow: jira [ 10298 ] => Firebird [ 14536 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

QA Status: No test

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