0

I'm creating a Java program to run C executables, using Runtime.getRuntime.exec(String command) method, but sometimes it returns exitValue=139(SIGSEGV) even if C programs work fine when I run them from terminal or Eclipse.

What could be the problem?

Process pro = Runtime.getRuntime().exec("./cExecutable 10");

System.out.println(command + " exitValue=" + pro.exitValue());

If it can be useful, I'm using Ubuntu 18.04.

Important, I also noticed that it happens most frequently when executable output has more than 600 lines .

In fact outputs of my programs are very large

Pipwolf54
  • 1
  • 2
  • This really depends on what you're doing inside your executable. Related: [What causes a SIGSEGV](https://stackoverflow.com/questions/1564372/what-causes-a-sigsegv). Java almost surely has nothing to do with this – Lino Mar 11 '21 at 15:13
  • @Pipwolf54 - Check the core dump. – Armali Mar 11 '21 at 15:52

0 Answers0