[ 
https://issues.apache.org/jira/browse/PROTON-1372?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Justin Ross updated PROTON-1372:
--------------------------------
    Description: 
This represents the event_loop aspect of the work below.

---
Original issue description:

If you have a libqpid-proton-cpp compiled with C\+\+11 and then link to it 
using a C\+\+03 and use the {{proton::container::schedule}} API then the 
application will crash. This is because there is an extra virtual function 
present in the middle of the C\+\+11 vtable compared to the C\+\+03 vtable. So 
that when used from '03 the wrong member function gets called.

The extra member function is present because of conditional compilation 
dependent on the C\+\+ version doing the compilation.

This should also be a problem the other way round too, so using a 
libqpid-proton-cpp compiled with C\+\+03 from C\+\+11 will cause there to be 
one fewer entry in the vtable, and using schedule will either get the wrong 
version of schedule or call an entry of the end of the vtable.

  was:
If you have a libqpid-proton-cpp compiled with C\+\+11 and then link to it 
using a C\+\+03 and use the {{proton::container::schedule}} API then the 
application will crash. This is because there is an extra virtual function 
present in the middle of the C\+\+11 vtable compared to the C\+\+03 vtable. So 
that when used from '03 the wrong member function gets called.

The extra member function is present because of conditional compilation 
dependent on the C\+\+ version doing the compilation.

This should also be a problem the other way round too, so using a 
libqpid-proton-cpp compiled with C\+\+03 from C\+\+11 will cause there to be 
one fewer entry in the vtable, and using schedule will either get the wrong 
version of schedule or call an entry of the end of the vtable.


> Use PIMPL, not an interface, for event_loop
> -------------------------------------------
>
>                 Key: PROTON-1372
>                 URL: https://issues.apache.org/jira/browse/PROTON-1372
>             Project: Qpid Proton
>          Issue Type: Bug
>          Components: cpp-binding
>    Affects Versions: 0.14.0
>            Reporter: Andrew Stitcher
>            Assignee: Andrew Stitcher
>            Priority: Blocker
>             Fix For: 0.17.0
>
>
> This represents the event_loop aspect of the work below.
> ---
> Original issue description:
> If you have a libqpid-proton-cpp compiled with C\+\+11 and then link to it 
> using a C\+\+03 and use the {{proton::container::schedule}} API then the 
> application will crash. This is because there is an extra virtual function 
> present in the middle of the C\+\+11 vtable compared to the C\+\+03 vtable. 
> So that when used from '03 the wrong member function gets called.
> The extra member function is present because of conditional compilation 
> dependent on the C\+\+ version doing the compilation.
> This should also be a problem the other way round too, so using a 
> libqpid-proton-cpp compiled with C\+\+03 from C\+\+11 will cause there to be 
> one fewer entry in the vtable, and using schedule will either get the wrong 
> version of schedule or call an entry of the end of the vtable.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org

Reply via email to