RPM Community Forums

Mailing List Message of <rpm-users>

free() pointer error when using bindings to read specfile

From: Eric MSP Veith <eveith@wwweb-library.net>
Date: Sun 13 Sep 2009 - 17:08:20 CEST
Message-Id: <200909131708.24058.eveith@wwweb-library.net>

I'm trying to read a spec file using RPM's bindings. I've tried both rpm5-perl 
and rpm5-python and both fail with the following error:

*** glibc detected *** python: free(): invalid next size (fast): 0x08ab9040 

This is what the Python script gives me, the error with Perl reads the same. 
My code looks as follows:

#!/usr/bin/env python

import rpm
import os
import sys

if len(sys.argv) != 2:
    print "Usage: %s SPECFILE" %(sys.argv[0])

ts_h = rpm.TransactionSet()
spec_h = ts_h.parseSpec(sys.argv[1])
print spec_h.check()

The perl version looks similar, but I'm using "RPM::Spec->new($file)" instead.

I've got no clue on where to look further here. rpmbuild e.g. works ok. Am I 
misung the bindings?

Thanks in advance.

		-- Eric

Received on Sun Sep 13 17:16:12 2009
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.