[ python-Bugs-856656 ] Problem in calling kpathsea library from Python extension

SourceForge.net noreply at sourceforge.net
Mon Dec 8 23:39:06 EST 2003


Bugs item #856656, was opened at 2003-12-09 13:39
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=856656&group_id=5470

Category: None
Group: Platform-specific
Status: Open
Resolution: None
Priority: 5
Submitted By: Jin-Hwan Cho (chofchof)
Assigned to: Nobody/Anonymous (nobody)
Summary: Problem in calling kpathsea library from Python extension

Initial Comment:
1. Environment:

System: FreeBSD 5.1-RELEASE
Packages: python-2.2.2_2, teTeX-2.0.2_2 (kpathsea 
library version 3.4.5)

2. Description:
  
Recently I was trying to write a Python extension using 
the kpathsea library. It was simple and everying went 
smoothly. But I got a severe problem in FreeBSD. Even 
simple code did not work in FreeBSD.

After trying some tests, I found where the problem 
occurred. That was "cnf.c" in the kpathsea library 
(contained in teTeX-2.0.2_2 package).

There is a place in "cnf.c" calling "hash_create()" 
function (defined in hash.c). However, in FreeBSD, 
the "hash_create()" was not called properly. After 
changing the name "hash_create()" to another one, for 
example, "hash_create2()", everything worked fine.

I'd like to know exact reason why this kind of problem 
occurs in FreeBSD.

3. How-To-Repeat:
 
On FreeBSD system with python-2.2.2_2 and teTeX-
2.0.2_2 installed, using the attached three files, run the 
following command

  python setup.py install

and then run

  python kpse_test.py

The result was "Segmentation fault (core dumped)".

4. Fix:

The problem above can be fixed by modifying the 
kpathsea library itself as follows:

Change the name of "hash_create" function (defined in 
hash.c) to another name, for example, "hash_create2" 
from several files, cnf.c, db.c, dir.c, fontname.c, hash.c, 
and hash.h.

It seems quite curious because there was no problem in 
cygwin.


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=856656&group_id=5470



More information about the Python-bugs-list mailing list