Opened 7 years ago

Closed 7 years ago

#4497 closed defect (fixed)

unchecked memory allocation leading to segmentationfault

Reported by: datendelphin Owned by: jburgess777@…
Priority: minor Milestone:
Component: osm2pgsql Version:
Keywords: Cc:

Description

Someone tried to run nominatim on an amazon ec2 micro instance, which has only 800MB ram. osm2pgsql segfaults, because the allocation of blocks (hardcoded to 1GB in the default cache strategy) fails.

I made a patch making it fail gracefully in that case

Of course, less than 1GB ram is extremely few, but I guess there are others trying to run it on such a tiny cloud instance.

Attachments (1)

osm2pgsql_alloc_check.patch (836 bytes) - added by datendelphin 7 years ago.
checks if the allocation of blocks was successfull, or exits nicely

Download all attachments as: .zip

Change History (2)

Changed 7 years ago by datendelphin

Attachment: osm2pgsql_alloc_check.patch added

checks if the allocation of blocks was successfull, or exits nicely

comment:1 Changed 7 years ago by amm

Resolution: fixed
Status: newclosed

I have applied a similar patch and also checked some other allocations for failure. Thanks for reporting

Note: See TracTickets for help on using tickets.