You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mesos.apache.org by "Timothy St. Clair (JIRA)" <ji...@apache.org> on 2014/06/26 19:11:25 UTC
[jira] [Resolved] (MESOS-1354) Resource leak in jvm.cpp
[ https://issues.apache.org/jira/browse/MESOS-1354?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Timothy St. Clair resolved MESOS-1354.
--------------------------------------
Resolution: Fixed
Fix Version/s: 0.20.0
> Resource leak in jvm.cpp
> ------------------------
>
> Key: MESOS-1354
> URL: https://issues.apache.org/jira/browse/MESOS-1354
> Project: Mesos
> Issue Type: Technical task
> Reporter: Niklas Quarfot Nielsen
> Assignee: Timothy St. Clair
> Priority: Minor
> Fix For: 0.20.0
>
>
> Again, may be false positive. Should be looked into.
> ________________________________________________________________________________________________________
> *** CID 1213891: Resource leak (RESOURCE_LEAK)
> /src/jvm/jvm.cpp: 79 in Jvm::create(const std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char>>>> &, JNI::Version, bool)()
> 73 typedef jint (*fnptr_JNI_CreateJavaVM)(JavaVM**, void**, void*);
> 74
> 75 fnptr_JNI_CreateJavaVM fn_JNI_CreateJavaVM =
> 76 (fnptr_JNI_CreateJavaVM)dlsym(handle, "JNI_CreateJavaVM");
> 77
> 78 if (fn_JNI_CreateJavaVM == NULL) {
> >>> CID 1213891: Resource leak (RESOURCE_LEAK)
> >>> Variable "handle" going out of scope leaks the storage it points to.
> 79 return Error(dlerror());
> 80 }
> 81
> 82 int result = fn_JNI_CreateJavaVM(&jvm, JNIENV_CAST(&env), &vmArgs);
> 83
> 84 if (result == JNI_ERR) {
> /src/jvm/jvm.cpp: 85 in Jvm::create(const std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char>>>> &, JNI::Version, bool)()
> 79 return Error(dlerror());
> 80 }
> 81
> 82 int result = fn_JNI_CreateJavaVM(&jvm, JNIENV_CAST(&env), &vmArgs);
> 83
> 84 if (result == JNI_ERR) {
> >>> CID 1213891: Resource leak (RESOURCE_LEAK)
> >>> Variable "handle" going out of scope leaks the storage it points to.
> 85 return Error("Failed to create JVM!");
> 86 }
> 87
> 88 delete[] opts;
> 89
> 90 return instance = new Jvm(jvm, version, exceptions);
> /src/jvm/jvm.cpp: 90 in Jvm::create(const std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char>>>> &, JNI::Version, bool)()
> 84 if (result == JNI_ERR) {
> 85 return Error("Failed to create JVM!");
> 86 }
> 87
> 88 delete[] opts;
> 89
> >>> CID 1213891: Resource leak (RESOURCE_LEAK)
> >>> Variable "handle" going out of scope leaks the storage it points to.
> 90 return instance = new Jvm(jvm, version, exceptions);
> 91 }
> 92
> 93
> 94 bool Jvm::created()
> 95 {
--
This message was sent by Atlassian JIRA
(v6.2#6252)