eclipsesource / eclipsesource/J2V8

SIGSEGV crash -- V8ObjectUtils.toV8Object when map has null as a key

Open
#557 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
2.6k
Forks
387
PR merge metrics
No merged PRs in 30d

Description

j2v8_linux_x86_64-4.8.0.jar

I know you are no longer supporting linux. I am reporting this in case the bug is generic and happens on Android as well.

crash when Map provided to V8ObjectUtils.toV8Object has null as a key. I am not expecting that null-as-a-key will be supported, just that a RuntimeException happen, rather than JVM crash.

==========================================

import com.eclipsesource.v8.V8;
import com.eclipsesource.v8.V8Object;
import com.eclipsesource.v8.utils.V8ObjectUtils;
import java.util.Map;
import java.util.HashMap;

class TestV8 {
public static void main(String[] args) {
Map hm = new HashMap();
hm.put(null, "null");
V8 mv8 = V8.createV8Runtime();
V8ObjectUtils.toV8Object(mv8, hm);
}
}

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.