8271003: hs_err improvement: handle CLASSPATH env setting longer than O_BUFLEN

Reviewed-by: dholmes, stuefe, iklam, minqi
This commit is contained in:
Calvin Cheung 2021-08-04 01:38:18 +00:00
parent 43a6ba9677
commit 3435d299f7
2 changed files with 86 additions and 1 deletions

View file

@ -989,7 +989,9 @@ void os::print_environment_variables(outputStream* st, const char** env_list) {
if (envvar != NULL) {
st->print("%s", env_list[i]);
st->print("=");
st->print_cr("%s", envvar);
st->print("%s", envvar);
// Use separate cr() printing to avoid unnecessary buffer operations that might cause truncation.
st->cr();
}
}
}