7187454: stack overflow in C2 compiler thread on Solaris x86

Added new FormatBufferResource class to use thread's resource area for error message buffer.

Reviewed-by: twisti
This commit is contained in:
Vladimir Kozlov 2012-07-30 09:49:25 -07:00
parent b9eb5785cc
commit 5e05a0d592
11 changed files with 42 additions and 23 deletions

View file

@ -91,6 +91,13 @@
# endif
#endif // PRODUCT
FormatBufferResource::FormatBufferResource(const char * format, ...)
: FormatBufferBase((char*)resource_allocate_bytes(RES_BUFSZ)) {
va_list argp;
va_start(argp, format);
jio_vsnprintf(_buf, RES_BUFSZ, format, argp);
va_end(argp);
}
void warning(const char* format, ...) {
if (PrintWarnings) {