Re: Problem of using malloc() without including stdlib.h

2012-02-03 Thread Anthony Petrov
Hi Jonathan, Let's consider e.g. src/share/native/sun/awt/splashscreen/java_awt_SplashScreen.c mentioned by you below. It #includes splashscreen_impl.h. This file #includes splashscreen_config.h. And finally, src/solaris/native/sun/awt/splashscreen/splashscreen_config.h #includes the stdli

Re: Problem of using malloc() without including stdlib.h

2012-02-03 Thread Jonathan Lu
Sorry for being absent from this thread so long, I just experienced couple of days with very limited Internet access. Actually the problem was firstly found on AIX platform, on which sizeof(malloc(1)) without including will always give 4 instead of 8. The symptom was runtime segment error n

Re: Problem of using malloc() without including stdlib.h

2012-01-18 Thread Kelly O'Hair
A webrev and a code review from the appropriate teams is indeed needed. -kto On Jan 18, 2012, at 9:56 AM, Phil Race wrote: > Its arguable, whether harmless or not, that each file needs to include it. > Its not unreasonable for an area of the code to have a header file such as > "awt.h" > that i

Re: Problem of using malloc() without including stdlib.h

2012-01-18 Thread Phil Race
Its arguable, whether harmless or not, that each file needs to include it. Its not unreasonable for an area of the code to have a header file such as "awt.h" that is supposed to be the one that's included by the other files in that area of the code, and which takes care of common includes. jni_u

Re: Problem of using malloc() without including stdlib.h

2012-01-18 Thread Kelly O'Hair
On Jan 18, 2012, at 12:19 AM, Jonathan Lu wrote: > Hi core-libs-dev, > > I found that for some native code of OpenJDK code base, malloc() is used > without including header file stdlib.h, such as following files, > ./src/solaris/native/sun/java2d/opengl/GLXSurfaceData.c > ./src/solaris/native/s

Re: Problem of using malloc() without including stdlib.h

2012-01-18 Thread Alan Bateman
On 18/01/2012 08:53, Jonathan Lu wrote: : Actually some core files are also involved in this problem, such as ./src/windows/native/java/io/io_util_md.c ./src/share/back/debugInit.c And this problem seems very generic, so I guess core-libs-dev list might be the place to raise it. -Jonathan 64

Re: Problem of using malloc() without including stdlib.h

2012-01-18 Thread Jonathan Lu
On 01/18/2012 04:31 PM, Alan Bateman wrote: On 18/01/2012 08:19, Jonathan Lu wrote: Hi core-libs-dev, I found that for some native code of OpenJDK code base, malloc() is used without including header file stdlib.h, such as following files, ./src/solaris/native/sun/java2d/opengl/GLXSurfaceData

Re: Problem of using malloc() without including stdlib.h

2012-01-18 Thread Alan Bateman
On 18/01/2012 08:19, Jonathan Lu wrote: Hi core-libs-dev, I found that for some native code of OpenJDK code base, malloc() is used without including header file stdlib.h, such as following files, ./src/solaris/native/sun/java2d/opengl/GLXSurfaceData.c ./src/solaris/native/sun/java2d/x11/XRBack

Problem of using malloc() without including stdlib.h

2012-01-18 Thread Jonathan Lu
Hi core-libs-dev, I found that for some native code of OpenJDK code base, malloc() is used without including header file stdlib.h, such as following files, ./src/solaris/native/sun/java2d/opengl/GLXSurfaceData.c ./src/solaris/native/sun/java2d/x11/XRBackendNative.c I assume that there's n