Subject: | failure with magic file |
Date: | Tue, 5 Jun 2007 00:32:31 +0100 (BST) |
To: | bug-File-MMagic-XS [...] rt.cpan.org |
From: | Anonymous <nobody [...] mixmin.net> |
File::MMagic::XS fails to parse the "official" [1] magic file. This is the
one that ships with Mac OSX, BSD, etc and is used by the file command.
Show quoted text
> perl -MFile::MMagic::XS -e '$m=File::MMagic::XS->new("/usr/share/file/magic");print $m->get_mime("ms.tex"), "\n"'
fmm_parse_magic_line: type regex .+\ -q\ with inverted index invalidfmm_parse_magic_line: type regex .+\ -c\ text (non-compressed) invalidperl(18277) malloc: *** Deallocation of a pointer not malloced: 0x1800634; This could be a double free(), or free() called with the middle of an allocated block; Try setting environment variable MallocHelp to see tools to help debug
perl(18277) malloc: *** Deallocation of a pointer not malloced: 0x180064c; This could be a double free(), or free() called with the middle of an allocated block; Try setting environment variable MallocHelp to see tools to help debug
fmm_parse_magic_line: offset &1 string $SuiteId invalid at -e line 1.
[1] ftp://ftp.astron.com/pub/file/
$ perl -V
Summary of my perl5 (revision 5 version 8 subversion 8) configuration:
Platform:
osname=darwin, osvers=8.9.1, archname=darwin-2level
uname='darwin macbook 8.9.1 darwin kernel version 8.9.1: thu feb 22 20:55:00 pst 2007; root:xnu-792.18.15~1release_i386 i386 i386 '
config_args='-des -Dprefix=/opt/local -Dccflags=-I'/opt/local/include' -Dldflags=-L/opt/local/lib -Dvendorprefix=/opt/local -Dcc=/usr/bin/gcc-4.0'
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=undef use64bitall=undef uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='/usr/bin/gcc-4.0', ccflags ='-I/opt/local/include -fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/opt/local/include',
optimize='-O3',
cppflags='-no-cpp-precomp -I/opt/local/include -fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/opt/local/include'
ccversion='', gccversion='4.0.1 (Apple Computer, Inc. build 5367)', gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
alignbytes=8, prototype=define
Linker and Libraries:
ld='env MACOSX_DEPLOYMENT_TARGET=10.3 cc', ldflags ='-L/opt/local/lib'
libpth=/opt/local/lib /usr/lib
libs=-ldbm -ldl -lm -lc
perllibs=-ldl -lm -lc
libc=/usr/lib/libc.dylib, so=dylib, useshrplib=false, libperl=libperl.a
gnulibc_version=''
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=bundle, d_dlsymun=undef, ccdlflags=' '
cccdlflags=' ', lddlflags='-L/opt/local/lib -bundle -undefined dynamic_lookup'
Characteristics of this binary (from libperl):
Compile-time options: PERL_MALLOC_WRAP USE_LARGE_FILES USE_PERLIO
Built under darwin
Compiled at May 25 2007 05:27:13
@INC:
/opt/local/lib/perl5/5.8.8/darwin-2level
/opt/local/lib/perl5/5.8.8
/opt/local/lib/perl5/site_perl/5.8.8/darwin-2level
/opt/local/lib/perl5/site_perl/5.8.8
/opt/local/lib/perl5/site_perl
/opt/local/lib/perl5/vendor_perl/5.8.8/darwin-2level
/opt/local/lib/perl5/vendor_perl/5.8.8
/opt/local/lib/perl5/vendor_perl
.