I've' submitted 207325 and 207359 for powerpc/powrpc64 c++ exception problems for projects/clang380-import -r295601 (9 line program)

Mark Millard markmi at dsl-only.net
Fri Feb 19 19:37:10 UTC 2016


The following program does not work for my example TARGET_ARCH=powerpc and TARGET_ARCH=powerpc64 environments for buildworld based on projects/clang380-import -r205601:

#include <exception>

int main(void)
{
    try { throw std::exception(); }
    catch (std::exception& e) {} // same result without &
    return 0;
}

The details vary for what happens and what compiler is in use.

TARGET_ARCH=powerpc with clang 3.8.0: SEGV

TARGET_ARCH=powerpc64 with devel/powerpc64-gcc: unbouded loop in _Unwind_RaiseException

For the powerpc64 context: g++49 can be used to show the problem as well:

Using g++49's a.out gets the same unbounded loop result for:

# g++49 -I /usr/include/c++/v1/ -L /usr/lib/ -g -Wall -pedantic exception_test.cpp                                                                                                                      

But the a.out works fine for a normal g++49 header/library usage:

# g++49 -g -Wall -pedantic exception_test.cpp
# ./a.out
# 



(These were noticed by trying to build and use kyua to run the /usr/tests material in tehse enviroments.)


===
Mark Millard
markmi at dsl-only.net



More information about the freebsd-ppc mailing list