Skip to content

Instantly share code, notes, and snippets.

@joelthompson
Last active December 23, 2015 08:09
Show Gist options
  • Save joelthompson/7f7a716bf3b16599c051 to your computer and use it in GitHub Desktop.
Save joelthompson/7f7a716bf3b16599c051 to your computer and use it in GitHub Desktop.
osv java bug repro
public class Hello
{
public static void main(String[] args)
{
System.out.println("Hello, World!");
java.nio.file.Path path = java.nio.file.Paths.get("/");
System.out.println("Path is " + path);
}
}
#
# Copyright (C) 2013 Cloudius Systems, Ltd.
#
# This work is open source software, licensed under the terms of the
# BSD license as described in the LICENSE file in the top-level directory.
#
.PHONY: module clean
jvm_dir=install/usr/lib/jvm
#java_version=$(shell ./latest.sh java-1.8.0-openjdk-headless x86_64)
#java_dir=http://mirrors.kernel.org/fedora/development/rawhide/x86_64/os/Packages/j/
java_version=1.8.0.65-3.b17.fc22
java_dir=https://kojipkgs.fedoraproject.org//packages/java-1.8.0-openjdk/1.8.0.65/3.b17.fc22/x86_64/
java_fullname=java-1.8.0-openjdk-headless-$(java_version).x86_64.rpm
tzdata_version=$(shell ./latest.sh tzdata-java noarch)
tzdata_dir=http://mirrors.kernel.org/fedora/development/rawhide/x86_64/os/Packages/t/
tzdata_fullname=tzdata-java-$(tzdata_version).noarch.rpm
SRC = $(shell readlink -f ../..)
module:
cd $(SRC)/java && mvn package -q -DskipTests=true
mkdir -p upstream
wget -c -O upstream/$(java_fullname) $(java_dir)$(java_fullname)
wget -c -O upstream/$(tzdata_fullname) $(tzdata_dir)$(tzdata_fullname)
rm -rf install
mkdir -p install
rpm2cpio upstream/$(java_fullname) | (cd install && cpio -id)
ln -sf java-1.8.0-openjdk-$(java_version).x86_64 $(jvm_dir)/java
rm -rf $(jvm_dir)/java/jre/lib/security/cacerts
rm -rf $(jvm_dir)/java/jre/lib/audio/*
rpm2cpio upstream/$(tzdata_fullname) | (cd install && cpio -id)
cp $(SRC)/java/runjava/target/runjava.jar install/usr/lib/jvm/java/jre/lib/ext/
ln -s /etc/pki/java/cacerts install/usr/lib/jvm/java/jre/lib/security/
clean:
rm -rf upstream install
cd $(SRC)/java && mvn clean -q
-rm -f dependency-reduced-pom.xml
#!/bin/bash
git clone https://github.com/cloudius-systems/osv.git --recursive
cd osv
sudo scripts/setup.py
make
cp -R apps/java-example apps/java-repro
wget -O apps/java-repro/Hello.java 'https://gist.githubusercontent.com/joelthompson/7f7a716bf3b16599c051/raw/39088e7fd94775c8059755dc3d58cc32ba38e6b3/Hello.java'
scripts/build-capstan-img java-nio-repro openjdk8-fedora,java-repro "App showing java.nio issues"
scripts/run.py -V
### Observe crash
### Kill qemu
wget -O apps/openjdk8-fedora/Makefile 'https://gist.githubusercontent.com/joelthompson/7f7a716bf3b16599c051/raw/f56215f35f180f8b738336618c0da9e3a18311f8/Makefile'
scripts/build-capstan-img java-nio-repro openjdk8-fedora,java-repro "App showing java.nio issues"
scripts/run.py -V
### No crash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment