Opened 10 years ago

Closed 10 years ago

#486 closed defect/bug (fixed)

[MG] mmap: Cannot allocate memory + segfault

Reported by: pini Owned by: cp15
Priority: blocker Milestone:
Component: mapdrivers/M&G Version: git master
Severity: Keywords:
Cc:

Description

Hi,

Navit segfault with MG maps since SVN rev 2627, because file_mmap introduces a significant memory leak: it uses file->size+1Mo to mmap but munmap file->size only.

I really can't see why this +1Mo was added here :/

Removing it (see attached mg_mleak.patch) makes navit happy again with MG maps.

Please see also attached mg_errcheck.patch which add some error checking related to the MG use of file_mmap.

Thanks,

_Gilles.

Attachments (2)

mg_mleak.patch (400 bytes) - added by pini 10 years ago.
mg_errcheck.patch (2.3 KB) - added by pini 10 years ago.

Download all attachments as: .zip

Change History (3)

Changed 10 years ago by pini

Changed 10 years ago by pini

comment:1 Changed 10 years ago by horwitz

  • Resolution set to fixed
  • Status changed from new to closed

The patches have been applied to revision 2665

Note: See TracTickets for help on using tickets.