More detailed output (C)

Problem description:
Output not informing about errors

Expected behavior:
Output to say if there was a segmentation fault or a illegal instruction (memory corruption) and saying the program exit status

Actual behavior:
it doesnt say about the runtime error. anytime there is a runtime error it just says exit status -1. I dont know if its bcuz of a function or a seg fault or a illegal instruction

(also a small bug too: when the program exits with a syntax error, it is impossible to delete the errors by using “clear output” on mobile)

the old output did all of these but thanks to the updates, it does none.

3 Likes

@solidracer Do you have a simple example that you can share?

this is the simplest way you can get a seg fault

int main() {
    printf("%d\n", *(int*)NULL);
    return 0;
}

and now when I execute this normally I see the message “seg fault” but with replit output nothing appears only the exit status -1 which is not enough for bigger code (as replit says status -1 for other errors like runtime errors or illegal instruction errors)

1 Like

@solidracer Thanks so much. I invited you to my Repl. If you have time, would you join my Repl and let me know what I’m doing wrong to reproduce the issue?

Feel free to make any changes. I just used the C template and entered your code instead.

I wrote a code that must generate a seg fault and output “seg fault” but it just writes exit status -1 (on the corner of the output) the problem is that this exit status error -1 is used for every runtime error and can get mixed up, if did so it can be literal hell to find the memory error

Understood. Thank you for your help. I’ll see what we can do.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.