Mercurial > hg > graal-jvmci-8
comparison src/os/linux/vm/os_linux.cpp @ 1497:96d554193f72
6944822: Fix for 6938627 exposes problem with hard-coded buffer sizes
Summary: Make tmpdir buffer sizes MAX_PATH+1
Reviewed-by: dholmes, coleenp
Contributed-by: andreas.kohn@fredhopper.com
author | coleenp |
---|---|
date | Mon, 19 Apr 2010 18:58:31 -0400 |
parents | a2ea687fdc7c |
children | 3fca8e9cd36a |
comparison
equal
deleted
inserted
replaced
1355:6ccd32c284ac | 1497:96d554193f72 |
---|---|
2303 | 2303 |
2304 if (!UseOprofile) { | 2304 if (!UseOprofile) { |
2305 return; | 2305 return; |
2306 } | 2306 } |
2307 | 2307 |
2308 char buf[40]; | 2308 char buf[PATH_MAX+1]; |
2309 int num = Atomic::add(1, &cnt); | 2309 int num = Atomic::add(1, &cnt); |
2310 | 2310 |
2311 snprintf(buf, sizeof(buf), "%s/hs-vm-%d-%d", | 2311 snprintf(buf, sizeof(buf), "%s/hs-vm-%d-%d", |
2312 os::get_temp_directory(), os::current_process_id(), num); | 2312 os::get_temp_directory(), os::current_process_id(), num); |
2313 unlink(buf); | 2313 unlink(buf); |