java native.loadlibrary,JNA Native.loadLibrary生成内存故障:__memmove_avx_unaligned_erms

I develop an app in java that loads a C++ shared library using JNA. The detailed procedure is the following.

Find library in the jar

use System.load( C_LIBRARY_PATH ) with the result of step 1

Load library using JNA tools: Wrapper INSTANCE = Native.loadLibrary( C_LIBRARY_PATH, Wrapper.class );

This procedure is used to create a wrapper of the c++ library and hence produces a java library that is used for other projects. Point 1 and 2 are inspired by the work of adamheinrich. The existence of the file is checked before calling the load function.

When using the java wrapper in a project I randomly have an error like below. Could you guide me in debugging and try to control this random failure?

#

# A fatal error has been detected by the Java Runtime Environment:

#

# SIGSEGV (0xb) at pc=0x00007ff754e1cf9b, pid=8922, tid=9159

#

# JRE version: OpenJDK Runtime Environment (10.0.1+10) (build 10.0.1+10)

# Java VM: OpenJDK 64-Bit Server VM (10.0.1+10, mixed mode, tiered, compressed oops, g1 gc, linux-amd64)

# Problematic frame:

# C [libc.so.6+0x15cf9b] __memmove_avx_unaligned_erms+0x8b

#

# Core dump will be written. Default location: Core dumps may be processed with "/usr/lib/systemd/systemd-coredump %P %u %g %s %t %c %h %e" (or dumping to /home/core.8922)

#

# If you would like to submit a bug report, please visit:

# http://bugreport.java.com/bugreport/crash.jsp

# The crash happened outside the Java Virtual Machine in native code.

# See probl

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值