| Summary: | Console does not show segmentation fault | ||
|---|---|---|---|
| Product: | [Tools] CDT | Reporter: | Lukas Felber <l.felber> |
| Component: | cdt-core | Assignee: | Project Inbox <cdt-core-inbox> |
| Status: | REOPENED --- | QA Contact: | Jonah Graham <jonah> |
| Severity: | normal | ||
| Priority: | P3 | CC: | dominic.scharfe, hoang_soccer, malaperle, overholt, yevshif |
| Version: | 8.0 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| Whiteboard: | |||
|
Description
Lukas Felber
I'm going to mark this not eclipse. The seg-fault message comes from the Java VM. (In reply to comment #1) > I'm going to mark this not eclipse. The seg-fault message comes from the Java > VM. I'm not very happy with your "solution". I'm trying to help improve CDT here. If you like to have CDT seen as bad software by newcomers then just leave this bug closed. Is there no interest in having CDT be simple and informative also for new C++ developers? There should be a way to handle that seg-fault coming from Java VW by CDT. Apparently there is such a way since one can see ( -> in CDT ) that a seg-fault occurred when running in debugging via CDT. since the problem is neither "non-eclipse" (in my point of view) nor "solved" in any way, I reopen the ticket. Yes,I agree that this bug can be annoying, especially for university students who often use their terminal for debugging, they won't see it in Eclipse console. This ticket is quiet old, however I think the use case is still valid. It would indeed be nice to get some kind of feedback in the console if a segmentation fault occurs. As far as I know usually the exit code 139 implies a segmentation fault. I would expect this code to appear in the little text field at the top of the console. However (at least on my CentOS 8 machine) the exit code for programs failing with a segmentation fault is always displayed as -1. Therefore I did some debugging; I'm not sure if this is intended or a bug, but there seems to be a difference between the exitValue() function of org.eclipse.cdt.utils.spawner.Spawner and the exitValue() of java.lang.UNIXProcess. Launching an executable with CDTs LocalRunLaunchDelegate in most cases uses the Spawner class, which has native implementations for different operating systems. I tried using a custom LaunchDelegate implementation which creates a UNIXProcess and in this case indeed 139 is returned by exitValue(). So I assume this is either a bug in the wait0() method in org.eclipse.cdt/core/org.eclipse.cdt.core.native/native_src/unix/exec_unix.c or this behavior is intended. Can anyone provide more information about the native spawner? |