(perl) Pinging a bad file and dying causes seg fault.

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
wilburlo

(perl) Pinging a bad file and dying causes seg fault.

Post by wilburlo »

Hi!

I've tested this in Image::Magick 6.3.3. This program produces a segmentation fault when run.

TIA,

-daniel

Code: Select all

#!/usr/bin/perl

use Image::Magick;

my $image=Image::Magick->new();

open my $fh, '>', 'bad.jpg';
print $fh "WEEEEE";
close $fh;

# pings of very non-valid jpgs causes seg faults.
my @stuff = $image->ping('bad.jpg');

die "this causes a seg fault\n";
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: (perl) Pinging a bad file and dying causes seg fault.

Post by magick »

Your program runs fine with the latest ImageMagick release 6.3.5-6.
wilburlo

Re: (perl) Pinging a bad file and dying causes seg fault.

Post by wilburlo »

I've asked our sys. admin. to install the latest image magick, and I will try again. :)

Thank you for your time,

-daniel
wilburlo

Re: (perl) Pinging a bad file and dying causes seg fault.

Post by wilburlo »

Our sys. admin. just upgraded image magick on one of our servers, I ran the program again and it segment faulted.
We are using Image-Magick 6.3.5-6
perl 5.8.8
FreeBSD 6.1 stable.

Here is a sample run,

Is there any information or anything else I can do to help you solve this problem?

Regards,

-daniel

[4:34pm]/home/daniel>cat go.pl
#!/usr/bin/perl

use Image::Magick;

my $image=Image::Magick->new();

open my $fh, '>', 'bad.jpg';
print $fh "WEEEEE";
close $fh;

# pings of very non-valid jpgs causes seg faults.
my @stuff = $image->ping('bad.jpg');

die "this causes a seg fault\n";
[4:34pm]/home/daniel>perl go.pl
this causes a seg fault
Segmentation fault
[4:34pm]/home/daniel>identify -version
Version: ImageMagick 6.3.5 08/27/07 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2007 ImageMagick Studio LLC

[4:34pm]/home/daniel>uname -a
FreeBSD dv3.picturetrail.com 6.1-STABLE FreeBSD 6.1-STABLE #1: Thu Jun 15 14:41:29 PDT 2006 nicole@www12.picturetrail.com
:/usr/obj/usr/src/sys/WWWv2 amd64
[4:34pm]/home/daniel>perl -v

This is perl, v5.8.8 built for amd64-freebsd
(with 1 registered patch, see perl -V for more detail)

Copyright 1987-2006, Larry Wall

Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl". If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.

[4:34pm]/home/daniel>
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: (perl) Pinging a bad file and dying causes seg fault.

Post by magick »

We can't reproduce the problem under Fedora or Centros. Can you post a stack trace so we know the fault is within PerlMagick or ImageMagick.
wilburlo

Re: (perl) Pinging a bad file and dying causes seg fault.

Post by wilburlo »

I wasn't able to get a stack trace for you; our sys. admin is currently away, and I'm not sure why the command isn't working. I will get back to you tomorrow.

Regards,

-daniel
wilburlo

Re: (perl) Pinging a bad file and dying causes seg fault.

Post by wilburlo »

Ok, our sys admin. got truss working. here is the URL for the full output file:

http://www.mediatechnique.com/truss/go.truss.txt (423k)

Thank you,

-daniel

Let me know if there is anything else you need!
Post Reply