qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (PROTON-1590) Segfaults when compiling C++03 clients with a C++11 compiled proton-cpp library
Date Tue, 19 Sep 2017 20:11:01 GMT

    [ https://issues.apache.org/jira/browse/PROTON-1590?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16172273#comment-16172273
] 

ASF subversion and git services commented on PROTON-1590:
---------------------------------------------------------

Commit cdd86bcfe748bb979d7f7f1a07a73ed81b0acabe in qpid-proton's branch refs/heads/master
from [~astitcher]
[ https://git-wip-us.apache.org/repos/asf?p=qpid-proton.git;h=cdd86bc ]

PROTON-1590: [C++ binding] Make sasl and ssl objects copyable and assignable
- Only ensure that they can't be default constructed (as that makes little sense)
- In retrospect only allowing these objects to be copied/assigned is harmless
- This fixes some issues when mixing C++03 and C++11 compilation


> Segfaults when compiling C++03 clients with a C++11 compiled proton-cpp library
> -------------------------------------------------------------------------------
>
>                 Key: PROTON-1590
>                 URL: https://issues.apache.org/jira/browse/PROTON-1590
>             Project: Qpid Proton
>          Issue Type: Bug
>          Components: cpp-binding
>            Reporter: Jiri Danek
>            Assignee: Andrew Stitcher
>             Fix For: proton-c-0.18.0
>
>
> Compile the proton library as usual.
> {noformat}
> cmake .. -DBUILD_GO=OFF -DCMAKE_INSTALL_PREFIX=../install -GNinja
> ninja install
> {noformat}
> Now compile an application that uses container.schedule() function. An example should
work fine.
> {noformat}
> g++ -std=c++03 scheduled_send_03.cpp -I ../../install/include -L ../../install/lib64
-l qpid-proton-cpp -l qpid-proton-core -l qpid-proton-proactor
> {noformat}
> Run this and observe the segfault
> {noformat}
> LD_LIBRARY_PATH=../../install/lib64 ./a.out  
> Segmentation fault
> {noformat}
> {noformat}
> $ LD_LIBRARY_PATH=../../install/lib64 gdb --args ./a.out
> GNU gdb (GDB) 8.0
> Copyright (C) 2017 Free Software Foundation, Inc.
> [...]
> Reading symbols from ./a.out...done.
> (gdb) run
> Starting program: /home/jdanek/Work/repos/qpid-proton/examples/cpp/a.out 
> [Thread debugging using libthread_db enabled]
> Using host libthread_db library "/nix/store/l48biijfr1j6d5kdg911051x2phfjrz7-glibc-2.25/lib/libthread_db.so.1".
> Program received signal SIGSEGV, Segmentation fault.
> 0x00007fffffffae20 in ?? ()
> (gdb) bt
> #0  0x00007fffffffae20 in ?? ()
> #1  0x00007ffff7bb09d4 in std::function<void ()>::function(std::function<void
()> const&) (this=0x7ffffffface0, __x=...)
>     at /nix/store/pdidaf83cvkrgx8xjgjdnl5m1naqjbfk-gcc-7.1.0/include/c++/7.1.0/bits/std_function.h:677
> #2  0x00007ffff7bc714a in proton::work::work (this=0x7ffffffface0) at ../proton-c/bindings/cpp/include/proton/work_queue.hpp:47
> #3  proton::work_queue::schedule (this=<optimized out>, d=..., f=...) at ../proton-c/bindings/cpp/src/work_queue.cpp:49
> #4  0x0000000000405ade in void proton::schedule_work<proton::work_queue*, void (scheduled_sender::*)(proton::sender),
scheduled_sender*, proton::sender>(proton::work_queue*, proton::duration, void (scheduled_sender::*)(proton::sender),
scheduled_sender*, proton::sender) ()
> #5  0x0000000000405bfb in scheduled_sender::on_sender_open(proton::sender&) ()
> #6  0x00007ffff7bb8f3d in proton::(anonymous namespace)::on_link_remote_open (event=0x7fffffffb1a0,
handler=warning: RTTI symbol not found for class 'scheduled_sender'
> ...)
>     at ../proton-c/bindings/cpp/src/messaging_adapter.cpp:267
> #7  proton::messaging_adapter::dispatch (handler=warning: RTTI symbol not found for class
'scheduled_sender'
> ..., event=event@entry=0x61dcd0)
>     at ../proton-c/bindings/cpp/src/messaging_adapter.cpp:309
> #8  0x00007ffff7bafa2e in proton::container::impl::handle (this=this@entry=0x61d030,
event=0x61dcd0)
>     at ../proton-c/bindings/cpp/src/proactor_container_impl.cpp:601
> #9  0x00007ffff7bb006b in proton::container::impl::thread (this=this@entry=0x61d030)
>     at ../proton-c/bindings/cpp/src/proactor_container_impl.cpp:613
> #10 0x00007ffff7bb0413 in proton::container::impl::run (this=0x61d030, threads=1)
>     at ../proton-c/bindings/cpp/src/proactor_container_impl.cpp:651
> #11 0x0000000000404166 in main ()
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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


Mime
View raw message