gcc 4.4 vs gcc 4.5 - a heads up

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

gcc 4.4 vs gcc 4.5 - a heads up

Nigel Atkinson-2
I've just tracked down an annoying problem that arises with moving from
gcc 4.4 to gcc 4.5 - which might happen on Linux if you upgrade your
distribution.

The problem boiled down to a luabind lib compiled with 4.4 and my
program with 4.5, which caused a subtle bug in the dynamic casting with
some classes looking like their base class to Lua.  Not a bug with
luabind per se, but something to watch out for.

The solution was to re-compile luabind with gcc 4.5.  A fact I found
when adding cout's to luabind to see how the cast graph and cache
worked.

If anyone is interested, I have a fairly small program that exhibits the
problem.

Nigel Atkinson


------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________
luabind-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/luabind-user
Reply | Threaded
Open this post in threaded view
|

Re: gcc 4.4 vs gcc 4.5 - a heads up

Ryan Pavlik-4
Is this an issue that could be monitored by adding an automated test? (Is there any way to reproduce it using just a single compiler version, and/or can it be tested using a single executable?)

Ryan

On Tue, Jun 21, 2011 at 8:23 AM, Nigel Atkinson <[hidden email]> wrote:
I've just tracked down an annoying problem that arises with moving from
gcc 4.4 to gcc 4.5 - which might happen on Linux if you upgrade your
distribution.

The problem boiled down to a luabind lib compiled with 4.4 and my
program with 4.5, which caused a subtle bug in the dynamic casting with
some classes looking like their base class to Lua.  Not a bug with
luabind per se, but something to watch out for.

The solution was to re-compile luabind with gcc 4.5.  A fact I found
when adding cout's to luabind to see how the cast graph and cache
worked.

If anyone is interested, I have a fairly small program that exhibits the
problem.

Nigel Atkinson


------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________
luabind-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/luabind-user



--
Ryan Pavlik
HCI Graduate Student
Virtual Reality Applications Center
Iowa State University

[hidden email]
http://academic.cleardefinition.com

------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________
luabind-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/luabind-user
Reply | Threaded
Open this post in threaded view
|

Re: gcc 4.4 vs gcc 4.5 - a heads up

liam mail
In reply to this post by Nigel Atkinson-2


On 21 June 2011 14:23, Nigel Atkinson <[hidden email]> wrote:
dynamic casting

Ryan I would look at std::type_info for the prime suspect.

Liam

------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________
luabind-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/luabind-user
Reply | Threaded
Open this post in threaded view
|

Re: gcc 4.4 vs gcc 4.5 - a heads up

Nigel Atkinson-2
On Tue, 2011-06-21 at 16:06 +0100, liam mail wrote:
>
> On 21 June 2011 14:23, Nigel Atkinson <[hidden email]> wrote:
> dynamic casting
>        
> Ryan I would look at std::type_info for the prime suspect.
>
>
> Liam
>
I think you're right there. I was actaully hunting through
inheritance.cpp when the problem 'disappeared'.  It would make sense if
the implementation of type_info had changed between 4.4 and 4.5.

As for making an automated test - I can create an exe that exhibits the
problem, but only by compiling the luabind library with 4.4 and the
program itself with 4.5.  I could also 'fix' the bug by removing classes
after the one in question from the binding - which led me to the cast
graph.

This would have ramifications for making distribution packages (rpm,
deb, etc) for Luabind too I guess.

Nigel


------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________
luabind-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/luabind-user