[Gambas-devel] About gb.gsl components

Emil Lenngren emil.lenngren at ...176...
Tue Aug 7 00:06:58 CEST 2012


Ok. Have never seen it before... It is quite risky.

#define OBJECT_are_not_null(_o1, _o2) (((intptr_t)(_o1) & (intptr_t)(_o2))
!= 0)

The same there, the objects 0x0f0f0f00 and 0xf0f0f0f0 are not non-null
according to that define...

/Emil

2012/8/6 Benoît Minisini <gambas at ...1...>

> Le 05/08/2012 19:26, Emil Lenngren a écrit :
> > Bug: Is this typedef really correct?
> > #define TYPE_are_objects(_t1, _t2) (((_t1) & (_t2)) >= T_OBJECT)
> >
> > Theoretically, _t1 could be 0xf0f0f0f0 and _t2 could be 0x0f0f0f00, both
> > are valid pointers, but according to that typedef, they are not objects.
>
> This is a well-known kind of optimizations often named as "bug". :-)
>
> --
> Benoît Minisini
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Gambas-devel mailing list
> Gambas-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/devel/attachments/20120807/b6014e06/attachment.html>


More information about the Devel mailing list