Bug 213282 - SDL_image crashed on IMG_ReadXPMFromArray
SDL_image crashed on IMG_ReadXPMFromArray
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: SDL_image (Show other bugs)
6
All Linux
medium Severity medium
: ---
: ---
Assigned To: Brian Pepple
Fedora Extras Quality Assurance
:
Depends On:
Blocks: sear FE7Target
  Show dependency treegraph
 
Reported: 2006-10-31 11:16 EST by Simon Goodall
Modified: 2007-11-30 17:11 EST (History)
1 user (show)

See Also:
Fixed In Version: 1.2.5-3
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-11-26 10:39:17 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Test code (451 bytes, application/octet-stream)
2006-10-31 11:17 EST, Simon Goodall
no flags Details
one way to patch it (470 bytes, patch)
2006-10-31 13:09 EST, Michael Schwendt
no flags Details | Diff
Mock Build Log (9.42 KB, text/plain)
2006-11-21 12:00 EST, Brian Pepple
no flags Details
Mock Root Log (24.63 KB, text/plain)
2006-11-21 12:02 EST, Brian Pepple
no flags Details

  None (edit)
Description Simon Goodall 2006-10-31 11:16:58 EST
Description of problem:
A segfault occurs when calling IMG_ReadXPMFromArray. This has worked fine in
previous SDL_image versions (e.g. 1.2.4 in FC5).
I have attached some sample code to replicate this issue.

compile with gcc test.cpp -o test -I /usr/include/SDL -lstdc++ -lSDL -lSDL_image
and run with ./test

Version-Release number of selected component (if applicable):
SDL_image-1.2.5-2.fc6

How reproducible:
Always

Steps to Reproduce:
1. Install SDL_image-devel
2. extract tar.gz containing source file
3. gcc test.cpp -o test -I /usr/include/SDL -lstdc++ -lSDL -lSDL_image
4. ./test
  
Actual results:
Segmentation fault

Expected results:
Some output text.


Additional info:
Comment 1 Simon Goodall 2006-10-31 11:17:06 EST
Created attachment 139870 [details]
Test code
Comment 2 Michael Schwendt 2006-10-31 13:09:19 EST
Created attachment 139880 [details]
one way to patch it

Confirmed. It's an upstream bug.

The included "showimage" demo program also fails if built with
-DXPM_INCLUDED defined.

Here's one way to patch it as a work-around. SDL_RWtell(..) is a
macro which cannot be called with a NULL pointer as argument.
Comment 3 Brian Pepple 2006-11-01 13:21:45 EST
Michael, thanks for the patch.

SDL_image is failing to build in mock right now (probably due to a missing BR,
since the main SDL package was updated recently), and hopefully I can get some
free time this weekend to investigate what the problem is.  Once I figure that
out, I'll apply your patch.
Comment 4 Simon Goodall 2006-11-21 04:42:23 EST
I've tried the patch against the current src rpm and it fixed my issue.
Comment 5 Brian Pepple 2006-11-21 10:21:46 EST
Did you try building it in mock?  Something changed in the SDL package, and I
haven't had a chance to figure out what BR needs to be added to get SDL_image to
build again.
Comment 6 Michael Schwendt 2006-11-21 11:07:52 EST
Can you provide a build log?
Comment 7 Brian Pepple 2006-11-21 12:00:23 EST
Created attachment 141793 [details]
Mock Build Log
Comment 8 Brian Pepple 2006-11-21 12:02:21 EST
Created attachment 141794 [details]
Mock Root Log

Michael, if you don't have time to look this, I should probably have some time
this weekend.
Comment 9 Michael Schwendt 2006-11-21 13:46:48 EST
Cannot reproduce. It fails in a simple AC_TRY_LINK check for SDL.
Package "SDL" is unchanged since July 27th.
Comment 10 Michael Schwendt 2006-11-25 10:16:04 EST
SDL_image rebuilds flawlessly for FC-6:
http://buildsys.fedoraproject.org/build-status/job.psp?uid=22289

checking for sdl-config... /usr/bin/sdl-config
checking for SDL - version >= 1.2.10... yes

No idea what local problems you have run into

I'm going to remove the test-build from the needsign queue.
Comment 11 Brian Pepple 2006-11-25 10:31:21 EST
(In reply to comment #10)
> SDL_image rebuilds flawlessly for FC-6:
> http://buildsys.fedoraproject.org/build-status/job.psp?uid=22289
> 
> checking for sdl-config... /usr/bin/sdl-config
> checking for SDL - version >= 1.2.10... yes
> 
> No idea what local problems you have run into

Hmm, that's odd since I was building it in Mock (Look at the attached build log
from 2006-11-21).
Comment 12 Brian Pepple 2006-11-26 10:39:17 EST
Not sure what's causing problems with the mock build, but regardless the build
system seems to be fine.  Fixed with in 1.2.5-3 which should be available with
the next FE push.  Thanks for the patch Michael.

Note You need to log in before you can comment on or make changes to this bug.