[Bug 131597] [kernel] c++ exceptions very slow on FreeBSD 7.1/amd64

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Sat Nov 4 16:42:12 UTC 2017


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=131597

--- Comment #24 from Mikael Simonsson <m at mikaelsimonsson.com> ---
Hi,

I ran into this today with Clang 5, is there anything I can do to help fix
this?

Here's my test case:

#include <cstdio>
#include <stdexcept>

int main(int argc, char**)
{
    ::printf("Before\n");

    try
    {
        if (argc != 2)
        {
            throw std::invalid_argument{""};
        }
    }
    catch (...)
    {
    }

    ::printf("After\n");

    return 0;
}

If I trigger the exception, ktrace shows 27 (!) sigprocmask calls between the
write calls.

Compiled with:
clang++ -DNDEBUG -O2 -march=native  -std=c++17 -stdlib=libc++ -fuse-ld=lld

Thanks,
Mikael

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list