This is the mail archive of the gcc-prs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

libgcj/5064: java/lang/natClassLoader.cc doesn't compile on systems without snprintf



>Number:         5064
>Category:       libgcj
>Synopsis:       java/lang/natClassLoader.cc doesn't compile on systems without snprintf
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Dec 10 15:46:00 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     Rainer Orth
>Release:        3.1 20011210 (experimental)
>Organization:
>Environment:
System: OSF1 korsakov V4.0 1229 alpha
Machine: alpha
	
host: alphaev67-dec-osf4.0f
build: alphaev67-dec-osf4.0f
target: alphaev67-dec-osf4.0f
configured with: /vol/gnu/src/gcc/gcc-dist/configure --prefix=/vol/gcc --with-local-prefix=/vol/gcc --disable-nls --enable-libgcj alphaev67-dec-osf4.0f
>Description:
libgcj fails to compile on this target:

/vol/gnu/src/gcc/gcc-dist/libjava/java/lang/natClassLoader.cc: In function 
   `void _Jv_RegisterClassHookDefault(java::lang::Class*)':
/vol/gnu/src/gcc/gcc-dist/libjava/java/lang/natClassLoader.cc:468: `snprintf' 
   undeclared (first use this function)
/vol/gnu/src/gcc/gcc-dist/libjava/java/lang/natClassLoader.cc:468: (Each 
   undeclared identifier is reported only once for each function it appears 
   in.)

Tru64 UNIX V4.0 (as well as e.g. IRIX 6.2 and Solaris 2.5.1) lacks snprintf in
libc.  libgcj should still be usable on such platforms.
	
>How-To-Repeat:
Bootstrap gcc with --enable-libgcj.
	
>Fix:
Use sprintf with a format (like %.170s or some such) to avoid buffer overflows.
	
>Release-Note:
>Audit-Trail:
>Unformatted:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]