Bug#925674: First triage

Markus Koschany apo at debian.org
Wed Jul 24 02:19:55 BST 2019


Hi Giovanni,

Am 23.07.19 um 18:57 schrieb Giovanni Mascellani:
> Hi,
> 
> the problem here is that operator== is called on an instance of
> std::map<>::iterator. The intention is probably to compare two iterators
> for inequality. But calling the operator overloading function is not the
> right thing, because the implementation of std::map<>::iterator might
> use the default iterator, and not overload it. Probably GCC 8 used an
> overloaded operator, but GCC 9 reverted to the default one. User code
> should not call the function "operator==", but use the "==" operator and
> let the compiler do its work.
> 
> I believe that the bug should be fixed by changing
> 
>   bool tolua_ret = (bool)  self->operator==(*value);
> 
> to
> 
>   bool tolua_ret = (bool)  ((*self)==(*value);
> 
> The problem is that that line of code is automatically generated by the
> "tolua" tool. I suppose that tolua should be fixed to generate correct
> code. I will look into that later, if I can.
> 
> Greetings from Curitiba!

Thanks for your analysis. I will prepare a patch after the day trip, as
soon as time permits.

Cheers,

Markus

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 963 bytes
Desc: OpenPGP digital signature
URL: <http://alioth-lists.debian.net/pipermail/pkg-games-devel/attachments/20190723/5a9ffa47/attachment.sig>


More information about the Pkg-games-devel mailing list