php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #21005 libpng 1.2.5; segfault while loading png image
Submitted: 2002-12-13 22:18 UTC Modified: 2002-12-14 04:13 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: tom at furi dot ca Assigned:
Status: Not a bug Package: GD related
PHP Version: 4.2.3 OS: Linux 2.4.18
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: tom at furi dot ca
New email:
PHP Version: OS:

 

 [2002-12-13 22:18 UTC] tom at furi dot ca
After recompiling php 4.2.3 with the gd image functions, I've found that libpng 1.2.5 is not compatible with php 4.2.3. While loading a png file using ImageCreateFromPNG($img); where $img is the filename, php would segfault. After recompiling php multiple times, i've still had the same problem. I gave the stable version of php in the development stage a try, and still recieved a segfault. So then i used the strace function at the command line along with the php cli to figure out that it would segfault when the png image was loaded. When i viewed the libpng website, i found the following...

"The current public release, libpng 1.2.5, has a new API (since 1.0.x) for dynamically enabling and disabling certain optimizations (currently limited to MMX code--which is compiled into GNU C versions only if PNG_THREAD_UNSAFE_OK is defined, due to the gcc code's use of static global variables to work around addressing limitations). As a consequence of this and some other changes, its DLL and shared-library (.so) numbers were bumped from 2 to 3."

After reading this, i've decided to downgrade to libpng1.0.15 and recompiled php. After doing this, the segfault would not appear again.

Hopes this helps...

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-12-14 04:13 UTC] sniper@php.net
This is libgd problem, not PHP problem.

 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sat Jul 26 23:00:02 2025 UTC