parse_number coredumps and bools Re: Need a help

From: John Utz (john_at_utzweb.net)
Date: Sat Sep 22 2001 - 06:31:06 BST


greetings all;

rod sent this to me. and i wanted to cc' the rest of the list and make an
observation or two.

the current working hypothesis is that these errors are caused by changes
between compilers, specifically their treatment of bools.

so, does anybody know if redhat7 is compiled with a different compiler
than the gcc-2.9.6 that it ships with? i built the app with the stock
compiler.

following that up. if ups is self aware enuf to notice that the boolsize
has changed ( i assume by looking at the width of the value on the stack,
but i dont know....i need to look. :-) ), then why not decide to make the
biggest possible width the default value and cast the short ones up when
it runs into them?

eager to here some opinions.....


On Fri, 21 Sep 2001, Rod Armstrong wrote:

> John,
> 	Russ Browne sent this out recently - it concerns your issue.
> Glad you like ups. Try using the X resource file and add
> *ScrollDelay: 25
> for more managable scrolling.
>
> Rod
>
> ---------- Begin Forwarded Message ----------
> Date: Mon, 10 Sep 2001 11:22:39 -0700
> From: russ_at_amc.com (Russell Browne)
> Message-Id: <200109101822.LAA03149_at_coho.amc.com>
> To: zdu_at_cs.nmsu.edu, ups-users_at_ukc.ac.uk
> Subject: Re: Need a help
> In-Reply-To: Mail from 'Zhidian Du <zdu_at_cs.nmsu.edu>'
>       dated: Mon, 10 Sep 2001 00:46:48 -0600
>
> > Hello:
> >
> > When i use UPS to run a program, it is ok.  When I double click the
> > variables, it crashed.  Here is the info:
> >
> > Warning:  sizeof(bool) inconsistent across compile modules!
> >           This may be caused by compiling with different versions of
> > g++.
> >           (You may suppress this warning by setting the environment
> >           variable UPS_WARN_INCONSISTENT_BOOL=off)
> > Fatal internal error: bad number in parse_num (aborting) ...
> > Dumping core ... Abort
> >
> >
> > I compiled the UPS, it doesn't work.
> >
> > Need a help
> >
> >
> > Zhidian Du
> >
>
> The warning results from using different compilers, or different versions
> of the same compiler, with different ideas about how big a bool is.
>
> The warning was put in when g++ changed sizeof(bool) from 1 to 4, with
> version 2.7.3(?).  I think version 3.0 will go back to a one byte bool,
> but I haven't gotten my hands on version 3.0 yet.
>
> If you're using different versions of g++ with different ideas about
> a basic data type, you should probably fix your builds to use the same
> version through out.  Otherwise, you're setting yourself up for some very
> hard to find bugs.
>
> You could also get the warning by mixing the Sunpro and g++ compilers.
> This would be less likely to introduce bugs since the differerent
> name mangling schemes would prevent either compiler from calling
> the other directly.  But it might lead to the core dump you report,
> if UPS decides it is reading debug data from one compiler then starts
> reading debug data from another instead and sees something that doesn't
> make sense.
>
> If that is the problem, you might be able to turn off -g on the compile
> line for one or the other compiler.  Of course, then you won't be able
> to debug that part of your code.
>
> Finally, I also don't know whether anyone's tried using UPS on g++ 3.0
> compiled code.  I think 3.0 contains many changes, and probably breaks
> something for us.  Can anyone in the user's group fill me in on that?
>
> Hope this helps.
>
> Russ Browne
> Applied Microsystems Corp.
>
>
> ----------- End Forwarded Message -----------
>

-- 

John L. Utz III
john_at_utzweb.net

Idiocy is the Impulse Function in the Convolution of Life


This archive was generated by hypermail 2.1.4 : Wed Feb 13 2002 - 21:51:34 GMT