On Tuesday,  7 November 2006 at 15:11, Christian Ohm wrote:
> On Tuesday,  7 November 2006 at 12:41, Dennis Schridde wrote:
> > Am Dienstag, 7. November 2006 00:22 schrieb Gerard Krol:
> > > Watch out for the:
> > >
> > >  #ifndef WZ_OS_WIN
> > >
> > > I guess it's better to have the same data types on all platforms. (On 
> > > MinGW
> > > BOOL is defined as int) And as memory usage is not really an issue, why 
> > > not
> > > leave BOOL == int? We just need to make sure it is saved to disk
> > > consistently, and int is the native (fast) data type.
> > That wasn't the point I was concerned about...
> > The interesting thing is _why_ does it break with BOOL not being int?
> > Means: _Who_ is relying on BOOL, which logically could be 1bit, to be 32bit 
> > long? Why does this make WZ segfault? ...
> > So the issue stays the same.
> > I guess somewhere WZ wants to store a pointer into a BOOL or assign 
> > something != TRUE/FALSE to it. And eg on a 64bit Platform I think 
> > sizeof(int)!=sizeof(void*)...
> > So this is a problem anyway, in case the reason it crashes is that it 
> > stores a 
> > pointer into a BOOL.
> > If it stores something != TRUE/FALSE into a BOOL, it's just ugly and should 
> > be 
> > fixed, too, for every platform and compiler.
> 
> Do a "#define bool BOOL" and use g++ to show you where BOOL is used
> in... interesting ways? Hm, sounds like fun, I might do that later
> myself...

Well, g++ wasn't a great help... Compiles fine, crashes exactly the same
way you described. valgrind is dog slow and crashed my system a few
times (I guess a sound conflict, since I was running xmms in the
background, and without it it worked), without useful output, seems to
be a stack corruption somewhere (possibly a wrong cast that hides the
error I wanted g++ to find...).

-- 
You have the capacity to learn from mistakes.  You'll learn a lot today.

_______________________________________________
Warzone-dev mailing list
[email protected]
https://mail.gna.org/listinfo/warzone-dev

Reply via email to