Issue Details (XML | Word | Printable)

Key: CORE-1983
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Alexander Peshkov
Reporter: Alexander Peshkov
Votes: 0
Watchers: 0

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

Out of memory condition in OS causes AV

Created: 08/Jul/08 03:53 AM   Updated: 12/Aug/16 07:05 PM
Component/s: Engine
Affects Version/s: 2.0.0, 2.0.1, 2.1 Alpha 1, 2.1 Beta 1, 2.0.2, 2.0.3, 2.1 Beta 2, 2.1 RC1, 2.5 Initial, 2.1 RC2, 2.1.0, 2.0.4, 2.5 Alpha 1, 2.1.1
Fix Version/s: 2.0.5, 2.1.2, 2.5 Beta 1

Environment: All posix except Solaris

Target: 2.5 Beta 1, 2.1.2 and 2.0.5
QA Status: Cannot be tested

 Description  « Hide
mmap() call returns MAP_FAILED (-1) in case of any error, including out of memory condition.
In alloc.cpp:external_alloc() value, returned by MMAP, is returned directly (except Solaris), no matter of the fact that caller expects NULL in case of allocation error, not -1. Therefore (void*)(-1) is used as a normally allocated memory block, definitely causing segfault at the moment of first use.

 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
There are no comments yet on this issue.