Libc++abi tests on ARM

Hi Logan,

I'm running the tests on libc++abi on ARM and I'm seeing some errors.
On your earlier email you said you ran the tests clean, and I was
wondering what magic do I need to get the same results. :slight_smile:

I had to change the build and test scripts a little to make it compile
on Linux, but nothing radical. I also had to copy (and link) the
libc++abi.so files on install/lib and use that clang.

On the test script, I've added "-lc++abi -lpthread" to OPTIONS and
added LD_LIBRARY_PATH="../../install/lib" to help it find libc++. With
that, I still got 6 failures:

terminating with uncaught exception of type char*
Aborted (core dumped)
catch_array_02.cpp failed at run time

terminating with uncaught exception of type void (*)()
Aborted (core dumped)
catch_function_02.cpp failed at run time

terminating with uncaught exception of type derived*
Aborted (core dumped)
catch_ptr_02.cpp failed at run time

terminating with uncaught exception of type int
Aborted (core dumped)
unwind_01.cpp failed at run time

terminating with uncaught exception of type int
Aborted (core dumped)
unwind_02.cpp failed at run time

terminating with uncaught exception of type char
Aborted (core dumped)
unwind_04.cpp failed at run time

Have you seen these failures? I haven't dug deep enough, just
wondering if it's something I'm (not) doing.

cheers,
--renato

Hi Renato,

There is a known issue in the code generated by LLVM.
As a workaround, I am adding “-funwind-tables” to compile the unit tests.

BTW, the LLVM revision which I am using is r207501.

It seems that the recent master has come regression on unwind_04 and unwind_05.

I am bisecting at the moment.

Sincerely,
Logan

There is a known issue in the code generated by LLVM.
As a workaround, I am adding "-funwind-tables" to compile the unit tests.

I thought I had fixed all of them. Do you have a bug number?

BTW, the LLVM revision which I am using is r207501.
It seems that the recent master has come regression on unwind_04 and
unwind_05.

I'm using 208522. I haven't seen errors in the unwind_05...

cheers,
--renato

There is a known issue in the code generated by LLVM.
As a workaround, I am adding "-funwind-tables" to compile the unit tests.

I thought I had fixed all of them. Do you have a bug number?

IIRC, you will also need "-funwind-tables" in the libc++abi build too, otherwise _Unwind_RaiseException gets marked as cantunwind and then none of it works.

Jon

I just re-compiled with -funwind-tables and got the same errors.

cheers,
--renato

Ignore me, I forgot the option on the tests as well. I see the same
failures as Logan.

Thanks!
--renato

Hi Renato,

It seems that nounwind is not a reliable criteria to decide whether we should generate handlerdata or not. In addition to the nounwind attribute and uwtable attribute, we should check the numbers of landingpad instruction as well. I have just uploaded the patch for review:

http://reviews.llvm.org/D3748

Also, there is a minor regression in LLVM master, and here’s the patch to fix the issue:

http://reviews.llvm.org/D3747

With both patches, the ARM EHABI should work with top-of-tree master. Please have a look. Feel free to let me know if you have any problems. Thanks.

Sincerely,
Logan