Skip to content

Runtime abort during exception handling in bolted static glibc binary #142987

Open
@Rin18

Description

@Rin18

I have a binary that results in a runtime crash after running bolt on it. The binary contains a simple test:

int main(int argc, char *argv[]) {
    try {
        throw 1;
    } catch (int e) {
        return 1;
    }
    return 0;
}

This was compiled with g++ test.cpp -static -o test
Then bolting the binary with llvm-bolt test -o test.bolt. Running test.out.bolt results in Aborted (core dumped) with this stack trace:

#0  0x0000000000846da8 in __pthread_kill_implementation.constprop.0 ()
#1  0x000000000083b5dc in raise ()
#2  0x0000000000800278 in abort ()
#3  0x000000000080fab8 in uw_init_context_1 ()
#4  0x000000000080ff9c in _Unwind_RaiseException ()
#5  0x0000000000801cec in __cxa_throw ()
#6  0x000000000080002c in main ()

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions