-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] 1.0.0: The test step_callback fails #338
Comments
@yurivict the test is complaining that a generic https://en.cppreference.com/w/cpp/utility/functional/bad_function_call I don't understand how this is possible, since the code explicitly throws https://github.com/bluescarni/heyoka/blob/master/src/step_callback.cpp#L74 I can amend the test to just check for something to be thrown, but I don't understand why this is failing only on FreeBSD. If you replace the failing line with: REQUIRE_THROWS_AS( step_cb(ta), std::exception ); and equivalently for the next line: REQUIRE_THROWS_AS(step_cb.pre_hook(ta), std::exception); Does this fix the failure? |
It's better to understand why this is failing exactly. |
This code catches
The order of catch instructions is important. |
Thanks for checking! So it looks like the problem is not I just noticed that there is a similar usage of https://github.com/bluescarni/heyoka/blob/master/test/callable.cpp#L154 Does this test pass fine on your setup? |
All other tests pass. |
@yurivict would you mind checking if the attached patch makes any difference? https://gist.github.com/bluescarni/67b13d5959535ae2f58754741b1f8a73 |
The same test failure happens with this patch. |
Ok, thanks for checking. Under the assumption that FreeBSD is using libc++ as its C++ standard library... (otherwise, disregard everything I am writing here). I noticed there is a difference in the implementation of exceptions classes in my local copy of libc++ (16.0.4). Specifically, an exception like class _LIBCPP_EXCEPTION_ABI invalid_argument
: public logic_error
{
... Whereas class bad_function_call
: public exception
{
... The important difference is the lack of https://gcc.gnu.org/wiki/Visibility (in particular the "Problems with C++ exceptions" section). So, could this be a bug in libc++? Do you have any way of finding out? |
@yurivict sorry disregard the above post, it turns out I was not looking at the correct file... Which version of libc++ are you using? |
@yurivict see also this report: llvm/llvm-project#54863 (comment) |
Hi @bluescarni , Do you have a C++ testcase that fails? Yuri |
@yurivict could you tell me if the libc++ version you are using contains the symbol for $ readelf -s -C --wide /usr/lib/libc++.so.1.0 |grep -i bad_function return something? |
|
@yurivict would you mind checking also if $ readelf -s -C --wide libheyoka.so|grep -i bad_func executed from the |
A weak symbol with this name is present:
|
Describe the bug
Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: