[Python-bugs-list] [ python-Bugs-712056 ] OpenBSD 3.2: make altinstall dumps core

SourceForge.net noreply@sourceforge.net
Sun, 30 Mar 2003 20:10:20 -0800


Bugs item #712056, was opened at 2003-03-29 21:44
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=712056&group_id=5470

Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: logistix (logistix)
Assigned to: Nobody/Anonymous (nobody)
Summary: OpenBSD 3.2: make altinstall dumps core

Initial Comment:
"make altinstall" fails when building on OpenBSD 3.2.   
The core dump appears to happen when the newly built 
python program attempts to byte-compile 
"./Lib/test/test_pep263.py".  A gdb 'bt' shows a 
segmentation fault in a call to libiconv.so.3.0's div() 
function. 
 
This could be a bug in libiconv.so's unicode handling. 
 
Also, running "./python ./Lib/test/test_pep263.py" from 
the newly built python throws an assertation error. 
 
I am using a home-built version of OpenBSD, so I'd 
appreciate it if someone else could verify this. 
 
make altinstall's output: 
 
... 
Compiling /usr/local/lib/python2.3/test/test_pep263.py ... 
python in free(): warning: modified (chunk-) pointer. 
python in free(): warning: modified (chunk-) pointer. 
python in free(): warning: modified (chunk-) pointer. 
Memory fault (core dumped) 
*** Error code 139 
 

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

>Comment By: logistix (logistix)
Date: 2003-03-30 22:10

Message:
Logged In: YES 
user_id=699438

Here's a (hopefully) non-bogus traceback. 

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

Comment By: Martin v. Löwis (loewis)
Date: 2003-03-30 15:27

Message:
Logged In: YES 
user_id=21627

The traceback is bogus. For example, in stackframe 19,
decode_str does not feature a call to PyUnicodeUCS2_Decode.
The most likely reason is that not all object files were
built with -g, so that some symbols are missing. I recommend
that you rebuild from scratch with --with-pydebug. Make sure
you have no object files left over from an earlier build.

If this causes the bug to disappear, configure with regular
options, and add -g to Makefile.pre manually. In either
case, verify that -g does get added to the compile commands.

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

Comment By: logistix (logistix)
Date: 2003-03-30 15:05

Message:
Logged In: YES 
user_id=699438

Okay, I lied.  I'm primarily a windows developer who's a bit  
new to the wonderful world of gdb!  It found the codec fine.   
libiconv was just the last library that gdb imported a symbol 
table from. 
  
The error actaully occurs on a realloc() to a list object.  I've  
attached the stack trace if it means anything.  
  
 man realloc also explains the error message: 
 
``modified (chunk-/page-) pointer.'' 
	The pointer passed to free or realloc has been modified. 
 

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

Comment By: Martin v. Löwis (loewis)
Date: 2003-03-30 03:05

Message:
Logged In: YES 
user_id=21627

It is surprising that it runs into iconv, as test_pep263
should use encodings.koi8_r.Codec, not the IconvCodec. What
do you get if you do

codecs.lookup("koi8-r")

In any case, the iconv codec (when used) should not crash.
It looks like there is some memory corruption going on.
However, without an OpenBSD system to debug libiconv, this
probably won't be found.

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

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