Skip to content

Instantly share code, notes, and snippets.

KUBOTA Yuji ykubota

  • Japan
Block or report user

Report or block ykubota

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@ykubota
ykubota / changelog.md
Last active Dec 2, 2019
Java 11による変更点。
View changelog.md

Java 11: 利用や動作に影響を与える変更点

Java 10はこちら

なお、本資料に記載しているものの一部は実機確認してないので、お使いのコードを修正する前に動作確認してください :)

View SecurityModule.java
import com.sun.naming.internal.ResourceManager;
public class SecurityModule extends SecurityManager {
@Override
public void checkPackageAccess(String pkg) {
super.checkPackageAccess(pkg);
}
@Override
public void checkPackageDefinition(String pkg) {
super.checkPackageDefinition(pkg);
}
@ykubota
ykubota / Java 10の変更点(JEP).md
Last active Mar 7, 2019
Java 10の変更点(JEP観点)非互換性観点は別記。
View Java 10の変更点(JEP).md
@ykubota
ykubota / changelog.md
Last active Dec 14, 2018
Java 10による変更点。[Java 女子部](https://javajo.doorkeeper.jp/events/71949) と [JJUG Night Seminar](https://jjug.doorkeeper.jp/events/71974) で利用
View changelog.md

Java 10: 利用や動作に影響を与える変更点

なお、本資料に記載しているものの一部は実機確認してないので、お使いのコードを修正する前に動作確認してください :)

はじめに

View compile.log
An exception has occurred in the compiler (11-internal). Please file a bug against the Java compiler via the Java bug reporting page (http://bugreport.java.com) after checking the Bug Database (http://bugs.java.com) for duplicates. Include your program and the following diagnostic in your report. Thank you.
java.lang.AssertionError: Unexpected intersection type: java.lang.Object&java.io.Serializable&java.lang.Comparable<? extends java.lang.Object&java.io.Serializable&java.lang.Comparable<?>>
at jdk.compiler/com.sun.tools.javac.jvm.ClassWriter.enterInner(ClassWriter.java:1043)
at jdk.compiler/com.sun.tools.javac.jvm.ClassWriter$CWSignatureGenerator.classReference(ClassWriter.java:312)
at jdk.compiler/com.sun.tools.javac.code.Types$SignatureGenerator.assembleClassSig(Types.java:5105)
at jdk.compiler/com.sun.tools.javac.code.Types$SignatureGenerator.assembleSig(Types.java:5037)
at jdk.compiler/com.sun.tools.javac.jvm.ClassWriter$CWSignatureGenerator.assembleSig(ClassWriter
@ykubota
ykubota / gcc version
Created Jul 24, 2017
__cplusplus on RHEL 7.
View gcc version
gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.8.5/lto-wrapper
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin --enable-initfini-array --disable-libgcj --with-isl=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/cloog-install --enable-gnu-indirect-function --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.8.5 20150623 (Red Hat 4.8.5-11) (GCC)
View gdb-2763.log
#0 0x00007f47efbb21d7 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1 0x00007f47efbb38c8 in __GI_abort () at abort.c:90
#2 0x00007f47ef4e5c89 in os::abort (dump_core=<optimized out>)
at /usr/src/debug/java-1.8.0-openjdk-1.8.0.131-3.b12.el7_3.x86_64/openjdk/hotspot/src/os/linux/vm/os_linux.cpp:1513
#3 0x00007f47ef6876d6 in VMError::report_and_die (this=this@entry=0x7f47d6749da0)
at /usr/src/debug/java-1.8.0-openjdk-1.8.0.131-3.b12.el7_3.x86_64/openjdk/hotspot/src/share/vm/utilities/vmError.cpp:1060
#4 0x00007f47ef687d97 in crash_handler (sig=11, info=0x7f47d6749ff0, ucVoid=0x7f47d6749ec0)
at /usr/src/debug/java-1.8.0-openjdk-1.8.0.131-3.b12.el7_3.x86_64/openjdk/hotspot/src/os/linux/vm/vmError_linux.cpp:106
#5 <signal handler called>
#6 os::is_first_C_frame (fr=fr@entry=0x7f47d674aaa0)
View core.2832 (bt)
(gdb) bt
#0 0x00007f523e4741d7 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1 0x00007f523e4758c8 in __GI_abort () at abort.c:90
#2 0x00007f523dda7c89 in os::abort (dump_core=<optimized out>)
at /usr/src/debug/java-1.8.0-openjdk-1.8.0.131-3.b12.el7_3.x86_64/openjdk/hotspot/src/os/linux/vm/os_linux.cpp:1513
#3 0x00007f523df496d6 in VMError::report_and_die (this=this@entry=0x7f51f31f5150)
at /usr/src/debug/java-1.8.0-openjdk-1.8.0.131-3.b12.el7_3.x86_64/openjdk/hotspot/src/share/vm/utilities/vmError.cpp:1060
#4 0x00007f523ddb1347 in JVM_handle_linux_signal (sig=11, info=0x7f51f31f53f0, ucVoid=0x7f51f31f52c0,
abort_if_unrecognized=<optimized out>)
at /usr/src/debug/java-1.8.0-openjdk-1.8.0.131-3.b12.el7_3.x86_64/openjdk/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp:541
@ykubota
ykubota / GCLimit.java
Last active Oct 18, 2016
reproduce sample: java.lang.OutOfMemoryError: GC overhead limit exceeded
View GCLimit.java
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
public class GCLimit {
static public void main(String[] args) {
Random random = new Random();
List<String> interned = new ArrayList<>();
while(true) {
int length = random.nextInt(100);
@ykubota
ykubota / sample.gdb
Created Jul 26, 2016
check address of counter and its member
View sample.gdb
set logging on
set logging file /path/to/file
f 7
p/x counter
p/x counter->objData
p/x (TObjectData *)counter->objData
p/x counter->objData->klassOop
You can’t perform that action at this time.