Opened 20 years ago

Closed 20 years ago

#580 closed defect (worksforme)

segmentation fault in php_mapscript.c, function php3_ms_img_saveImage()

Reported by: giangi@… Owned by: mapserverbugs
Priority: high Milestone:
Component: MapScript-PHP Version: unspecified
Severity: critical Keywords:
Cc:

Description

Version mapserver: the latest mapserver_dev
Version GD Library: 2.0.21

file: php_mapscript.c
function: php3_ms_img_saveImage()
line 5835:  free(iptr);

Free memory allocated from gdImagePngPtr(...)
but this function use: gdDPExtractData() GDLibrary function (__file__ 
gd_io_dp.c __line__ 114).

From the comment file:
"gdDPExtractData is the exception to this: it will return the pointer to
the internal data, (...)"

Is need free memory?

Change History (2)

comment:1 by dmorissette, 20 years ago

We use GD 2.0.22 with MapServer without problems, so we would need a script +
mapfile + data to reproduce this.

However, before you do that, I would like you to check that you don't have PHP
compiled with a different GD than php_mapscript.  This is a common error that
can happen if your PHP is compiled with its built-in GD, or if you have 2 copies
of GD libs on your system.

Could you test this by rebuilding PHP without GD and see if the crash persists?

comment:2 by dmorissette, 20 years ago

Resolution: worksforme
Status: newclosed
Closing as WORKSFORME.  Please test after recompiling PHP without GD, and reopen
if you can provide a test case to reproduce.
Note: See TracTickets for help on using tickets.