sgx-lkl: StringUtils.toLowerCase will cause problem when run as jvm app

Hi guys, when I run some code as jvm app in sgx-lkl simulation mode , it will exit with no output or exception. e.g.

System.out.println("Hello World");   // will print
String lowered = StringUtils.toLowerCase("ADSAFFDSzcxcx");
System.out.println(lowered); // will not print

in jdk, it’s

public static String toLowerCase(String str) {
        return str.toLowerCase(Locale.ENGLISH);
    }

Is this related to Locale class in Alphine? And I also wander that how can I debug jvm app in sgx-lkl simulation mode?

please help here. Thanks

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 30 (14 by maintainers)

Most upvoted comments

@SeanTAllen Thanks for reminding me, I’ve checked it, it’s org.apache.hadoop.util.StringUtils; @prp There is a line of static code in org.apache.hadoop.util.StringUtils

 public static final Pattern ENV_VAR_PATTERN = Shell.WINDOWS ?
    WIN_ENV_VAR_PATTERN : SHELL_ENV_VAR_PATTERN;

This may invoke a shell.

shexec = new ShellCommandExecutor(args);
shexec.execute();

and this will call java.lang.ProcessBuilder to start a process.

So, java’s standard java.lang.ProcessBuilder is not supported by SGX-LKL because it is multi-process?