[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#246319: libcln3: Segfaults in cln::I_to_digits when converting numbers to binary

On Wed, 28 Apr 2004, Steffen Röcker wrote:
> libcln segfaulted in cln::I_to_digits when I tried to convert numbers to
> binary, all other conversions worked.

Thanks for your bugreport.  This turns out to be a tricky one:  libcln
segfaults in src/integer/conv/cl_I_to_digits.cc:409, right after the label
"fertig:" where it tries to set erg->MSBptr to erg_ptr.

However, there is nothing wrong with that statement.  It appears to be a
compiler error introduced in GCC-3.0.0 and finally fixed in GCC-3.4.0.
It is only triggered when the option -fno-exceptions is turned on when CLN
is compiled.  Without that option, everything works fine.  I've just
reproduced this bug with GCC releases 3.1.1, 3.2.3, 3.3.2 and 3.3.3, and
also with 3.3.4-prerelease from CVS, all vanilla and bootstrapped locally.

Right now, I see four alternative solutions:
1) Upload a new Debian package where -fno-exceptions is not turned on.
2) Fix CLN by playing dirty tricks.  For instance, printing the variable
   erg's address in src/integer/output/cl_I_print.cc:30 seems to fix the
   problem.  It should be possible to somehow read that address without
   any side-effect.
3) Fix GCC on the 3.3 branch.  It would probably take me at least a full
   day to distill a useful testcase, however.  Likely more, if it turns
   out to be a Heisenbug.  And if this leads to a fix in the GCC 3.3
   branch is more then doubtful, I guess.
4) Use Debian's gcc-3.4 [0], making that a requirment for depending
   packages, too.

I have to sleep once or twice before deciding on what to do.

Soooo, what are the chances for gcc-3.4 hitting sarge as the default
compiler?  In my experience, this is a much better compiler than 3.3.3, in
all respects, including reliability.  The whole 3.3 series seems to be
having some problems.  In another context, it has already been suggested
by GCC developers that the 3.3 branch may have taken place too early,
causing patches not beeing applied properly and so on [1].


[0] <http://packages.qa.debian.org/g/gcc-3.4.html>
[1] <http://gcc.gnu.org/ml/gcc/2004-03/msg01702.html>
  .''`.  Richard B. Kreckel
 : :' :  <kreckel@debian.org>
 `. `'   <kreckel@ginac.de>
   `-    <http://www.ginac.de/~kreckel/>

Reply to: