exceptions4c icon indicating copy to clipboard operation
exceptions4c copied to clipboard

SIGXX should be removed from the calling process's signal mask, when catched signal exceptions ?

Open blocky2019 opened this issue 4 years ago • 1 comments

` int ut_example() {

    e4c_using_context(E4C_TRUE) {
    int * pointer = NULL;
    try {
        int oops = *pointer;
    }
    catch (BadPointerException) {
        printf("No problem ;-)");
        fflush(stdout);
    }
}

}

int main() {

while (true)
{
    ut_example();
    sleep(5);
}

} `

Output: No problem ;-) Segmentation fault (core dumped)

blocky2019 avatar Apr 08 '20 09:04 blocky2019

FIX: Add a line ' sigrelse(signal_number); ' in function '_e4c_library_handle_signal' (e4c.c)

blocky2019 avatar Apr 08 '20 09:04 blocky2019