← Back to team overview

openjdk team mailing list archive

Bug#785530: openjdk-8: Conflicting declarations of freeNativeStringArray to cause undefined behaviour

 

Package: openjdk-8
Version: 8u45-b14-2
Usertags: goto-cc

During a rebuild of all Debian packages in a clean sid chroot (using cowbuilder
and pbuilder) the build failed with the following error. Please note that we
use our research compiler tool-chain (using tools from the cbmc package), which
permits extended reporting on type inconsistencies at link time.

[...]
/usr/bin/gcc-4.9 -Xlinker -z -Xlinker relro -Xlinker -Bsymbolic-functions -Xlinker --hash-style=both -Xlinker -z -Xlinker defs -Xlinker -O1 -shared -L/srv/jenkins-slave/workspace/sid-goto-cc-openjdk-8/openjdk-8-8u45-b14/build/jdk/lib/amd64 -L/srv/jenkins-slave/workspace/sid-goto-cc-openjdk-8/openjdk-8-8u45-b14/build/jdk/lib/amd64/server -Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$ORIGIN  -Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$ORIGIN/.. -Xlinker -version-script=/srv/jenkins-slave/workspace/sid-goto-cc-openjdk-8/openjdk-8-8u45-b14/src/jdk/make/mapfiles/libawt_headless/mapfile-vers -Xlinker -soname=libawt_headless.so -o /srv/jenkins-slave/workspace/sid-goto-cc-openjdk-8/openjdk-8-8u45-b14/build/jdk/lib/amd64/libawt_headless.so /srv/jenkins-slave/workspace/sid-goto-cc-openjdk-8/openjdk-8-8u45-b14/build/jdk/objs/libawt_headless/AccelGlyphCache.o /srv/jenkins-slave/workspace/sid-goto-cc-openjdk-8/openjdk-8-8u45-b14/build/jdk/objs/libawt_headless/CUPSfuncs.o /srv/jenkins-slave/workspace/sid-goto-cc-openjdk-8/openjdk-8-8u45-b14/build/jdk/objs/libawt_headless/GLXGraphicsConfig.o /srv/jenkins-slave/workspace/sid-goto-cc-openjdk-8/openjdk-8-8u45-b14/build/jdk/objs/libawt_headless/GLXSurfaceData.o /srv/jenkins-slave/workspace/sid-goto-cc-openjdk-8/openjdk-8-8u45-b14/build/jdk/objs/libawt_headless/HeadlessToolkit.o /srv/jenkins-slave/workspace/sid-goto-cc-openjdk-8/openjdk-8-8u45-b14/build/jdk/objs/libawt_headless/OGLBlitLoops.o /srv/jenkins-slave/workspace/sid-goto-cc-openjdk-8/openjdk-8-8u45-b14/build/jdk/objs/libawt_headless/OGLBufImgOps.o /srv/jenkins-slave/workspace/sid-goto-cc-openjdk-8/openjdk-8-8u45-b14/build/jdk/objs/libawt_headless/OGLContext.o /srv/jenkins-slave/workspace/sid-goto-cc-openjdk-8/openjdk-8-8u45-b14/build/jdk/objs/libawt_headless/OGLFuncs.o /srv/jenkins-slave/workspace/sid-goto-cc-openjdk-8/openjdk-8-8u45-b14/build/jdk/objs/libawt_headless/OGLMaskBlit.o /srv/jenkins-slave/workspace/sid-goto-cc-openjdk-8/openjdk-8-8u45-b14/build/jdk/objs/libawt_headless/OGLMaskFill.o /srv/jenkins-slave/workspace/sid-goto-cc-openjdk-8/openjdk-8-8u45-b14/build/jdk/objs/libawt_headless/OGLPaints.o /srv/jenkins-slave/workspace/sid-goto-cc-openjdk-8/openjdk-8-8u45-b14/build/jdk/objs/libawt_headless/OGLRenderQueue.o /srv/jenkins-slave/workspace/sid-goto-cc-openjdk-8/openjdk-8-8u45-b14/build/jdk/objs/libawt_headless/OGLRenderer.o /srv/jenkins-slave/workspace/sid-goto-cc-openjdk-8/openjdk-8-8u45-b14/build/jdk/objs/libawt_headless/OGLSurfaceData.o /srv/jenkins-slave/workspace/sid-goto-cc-openjdk-8/openjdk-8-8u45-b14/build/jdk/objs/libawt_headless/OGLTextRenderer.o /srv/jenkins-slave/workspace/sid-goto-cc-openjdk-8/openjdk-8-8u45-b14/build/jdk/objs/libawt_headless/OGLVertexCache.o /srv/jenkins-slave/workspace/sid-goto-cc-openjdk-8/openjdk-8-8u45-b14/build/jdk/objs/libawt_headless/VDrawingArea.o /srv/jenkins-slave/workspace/sid-goto-cc-openjdk-8/openjdk-8-8u45-b14/build/jdk/objs/libawt_headless/X11Color.o /srv/jenkins-slave/workspace/sid-goto-cc-openjdk-8/openjdk-8-8u45-b14/build/jdk/objs/libawt_headless/X11FontScaler_md.o /srv/jenkins-slave/workspace/sid-goto-cc-openjdk-8/openjdk-8-8u45-b14/build/jdk/objs/libawt_headless/X11PMBlitLoops.o /srv/jenkins-slave/workspace/sid-goto-cc-openjdk-8/openjdk-8-8u45-b14/build/jdk/objs/libawt_headless/X11Renderer.o /srv/jenkins-slave/workspace/sid-goto-cc-openjdk-8/openjdk-8-8u45-b14/build/jdk/objs/libawt_headless/X11SurfaceData.o /srv/jenkins-slave/workspace/sid-goto-cc-openjdk-8/openjdk-8-8u45-b14/build/jdk/objs/libawt_headless/X11TextRenderer_md.o /srv/jenkins-slave/workspace/sid-goto-cc-openjdk-8/openjdk-8-8u45-b14/build/jdk/objs/libawt_headless/awt_Font.o /srv/jenkins-slave/workspace/sid-goto-cc-openjdk-8/openjdk-8-8u45-b14/build/jdk/objs/libawt_headless/fontpath.o    -ljvm -lawt -lm -ldl -ljava 

file /srv/jenkins-slave/workspace/sid-goto-cc-openjdk-8/openjdk-8-8u45-b14/src/jdk/src/solaris/native/sun/xawt/XlibWrapper.c line 91: 
reason for conflict at #this: conflict on POD

signed long int
signed int

error: conflicting function declarations `freeNativeStringArray'
old definition in module `XToolkit' file /srv/jenkins-slave/workspace/sid-goto-cc-openjdk-8/openjdk-8-8u45-b14/src/jdk/src/solaris/native/sun/xawt/XToolkit.c line 80
void (char **, signed long int)
new definition in module `XlibWrapper' file /srv/jenkins-slave/workspace/sid-goto-cc-openjdk-8/openjdk-8-8u45-b14/src/jdk/src/solaris/native/sun/xawt/XlibWrapper.c line 91
void (char **array, signed int length)
lib/Awt2dLibraries.gmk:630: recipe for target '/srv/jenkins-slave/workspace/sid-goto-cc-openjdk-8/openjdk-8-8u45-b14/build/jdk/lib/amd64/libawt_xawt.so' failed

For all platforms with sizeof(int)<sizeof(long) undefined behaviour will appear
in (at least) one of two ways: either the value will be padded with arbitrarily
valued bits, or the wrong set of bytes will be extracted, depending on
endianness.

Adjusting the declaration in XToolkit.c should solve the problem.

Best,
Michael



Attachment: pgpRAmpvjvd8E.pgp
Description: PGP signature