Issue Details (XML | Word | Printable)

Key: CORE-1937
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Adriano dos Santos Fernandes
Reporter: Adriano dos Santos Fernandes
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Firebird Core

Detect (instead of crash) FREE_IT UDFs that return pointer not allocated by ib_util_malloc

Created: 14/Jun/08 05:59 PM   Updated: 08/Nov/09 06:53 PM
Component/s: Engine, UDF
Affects Version/s: 1.0.3, 2.0.0, 1.5.4, 2.0.1, 2.1 Alpha 1, 2.1 Beta 1, 2.0.2, 2.0.3, 2.1 Beta 2, 1.5.5, 2.1 RC1, 2.5 Initial, 2.1 RC2, 2.1.0, 2.0.4
Fix Version/s: 2.5 Beta 1

Time Tracking:
Not Specified

File Attachments: 1. File libtest.tar (1 kB)


Planning Status: Unspecified


 Description  « Hide
When a UDF declared as FREE_IT returns a pointer not allocated by the same runtime of the server, a crash occurs when the server calls free(pointer).

Solution is creation of ib_util_free that verifies if the passed pointer was allocated by ib_util_malloc. When it wasn't, an exception is thrown and the pointer is not freed.

 All   Comments   Work Log   Change History   Version Control   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Adriano dos Santos Fernandes added a comment - 10/Jul/08 09:18 PM
Install directory detection test.