Subject: Solaris 7 Bus error
From: David F. Newman (dnewman@maraudingpirates.org)
Date: Wed Jan 10 2001 - 15:55:46 CST
Hi there,
*THE PROBLEM*
I'm trying to build abiword on Solaris 7 and split second
after the splash screen appears I get a Bus Error. A backtrace
shows that it bombed in iconv_close() that was being called
from XAP_EncodingManager::~XAP_EncodingManager().
*THE REASON*
The code that is calling iconv_close is assuming that the
conversion descriptors are non-zero when valid. I don't
know how iconv behaves on Linux, but on Solaris 7 iconv_open(3)
states that it will return -1 on a failure.
*THE SOLUTION*
Check for non -1 instead of non-zero. There are four lines
of code that need to be changed. The attached patch takes
care of it. I also had to cast the descriptor as an int
because iconv_t resolves to a pointer and c++ doesn't like
it when one compares pointers to ints.
Applying this patch gets rid of the Bus Error.
-- David F. Newman dnewman@maraudingpirates.org
This archive was generated by hypermail 2b25 : Wed Jan 10 2001 - 15:55:48 CST