Page 1 of 1

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

Posted: 2007-08-24T09:08:13-07:00
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";

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

Posted: 2007-08-24T11:24:08-07:00
by magick
Your program runs fine with the latest ImageMagick release 6.3.5-6.

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

Posted: 2007-08-25T00:22:15-07:00
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

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

Posted: 2007-08-27T16:37:47-07:00
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>

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

Posted: 2007-08-27T18:33:34-07:00
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.

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

Posted: 2007-08-27T21:04:36-07:00
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

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

Posted: 2007-08-29T14:05:56-07:00
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!