C++ exception of RPi

Andreas Tobler andreast-list at fgznet.ch
Sun Jan 18 22:00:53 UTC 2015


On 18.01.15 17:08, Daisuke Aoyama wrote:
> I've written example of C++ exception since just boot up r276981.
> Try to compile by "clang++ sample.cc".
> If your /lib/libcxxrt.so.1 is not affected, you can get a result like this:
>
> # ./a.out
> catch: 10
>
> Otherwise,
>
> # ./a.out
> pid 653 (a.out), uid 0: exited on signal 6 (core dumped)
> Abort trap (core dumped)
>
> sample.cc:
> ----------------------------------------------------------------------
> #include <iostream>
> using namespace std;
>
> int main()
> {
>          try{
>                  throw 10;
>          } catch (int e) {
>                  cout << "catch: " << e << endl;
>          }
> }
> ----------------------------------------------------------------------
>
> Regards,
>
For the record:

andreast at wandquad:~ % clang++ -o sample sample.cc
andreast at wandquad:~ % ./sample
Bus error (core dumped)
andreast at wandquad:~ % g++49 -o sample sample.cc
andreast at wandquad:~ % ./sample
catch: 10

---
FreeBSD 11.0-CURRENT #32: Sun Jan 18 21:36:10 CET 2015
 
andreast at t510.andreast.nets:/usr/obj/arm.armv6hf/usr/src/sys/WANDQUAD arm
FreeBSD clang version 3.5.1 (tags/RELEASE_351/final 225668) 20150115
---

And g++49 is from ports.

Andreas


More information about the freebsd-arm mailing list