[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#594807: openjdk-6 segfaults on armel with libc6 2.11.2-2



Package: libc6
Version: 2.11.2-2
Severity: grave

This change breaks OpenJDK on armel:

  * Add patches/any/cvs-flush-cache-textrels.diff to fix random crashes
    on ARM, if the executable or shared library has TEXTREL.

Reverting this change unbreaks openjdk.

$ java -version -zero
Segmentation fault

$ java -version -shark
java version "1.6.0_18"
OpenJDK Runtime Environment (IcedTea6 1.8.1) (6b18-1.8.1-1)
OpenJDK Shark VM (build 14.0-b16, mixed mode)

Please reassign to openjdk-6 if appropriate.

Xerces Rangby did some debugging in LP: #605042:

Testcase:
// gcc testcase.c -ldl
#include <stdio.h>
#include <stdlib.h>
#include <dlfcn.h>
int main(void){
  void *libjvm;

  libjvm = dlopen("./libjvm.so", RTLD_NOW + RTLD_GLOBAL);
  if (!libjvm) {
        fprintf (stderr, "%s\n", dlerror());
        exit(1);
  }
  printf("%X",(int)libjvm);
}

the crash happens during ldopen of the libjvm.so file from java
loading other librarys seems to work fine.

The libjvm.so can be obtained from the armel openjdk-6-jre-headless package
6b18-1.8.1-1 located in usr/lib/jvm/java-6-openjdk/jre/lib/arm/server/libjvm.so

The java libjvm.so file contains an asm interpreter that defines a .init_array section in the libjvm.so
defined in the file cppInterpreter_arm.S:
http://icedtea.classpath.org/hg/icedtea6/file/0b656f7601bd/ports/hotspot/src/cpu/zero/vm/cppInterpreter_arm.S

this .init_array section makes dlopen execute initialization code for the asm interpreter that seems to trigger the crash.



Reply to: