On Mon, 15 Feb 2021 23:15:46 GMT, Alex Menkov <amen...@openjdk.org> wrote:
>> Chris Plummer has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Fix issue with findsym on windows build that doesn't have symbolic >> information. > > src/jdk.hotspot.agent/linux/native/libsaproc/LinuxDebuggerLocal.cpp line 350: > >> 348: // Note, objectName is ignored, and may in fact be NULL. >> 349: // lookup_symbol will always search all objects/libs >> 350: //AutoJavaString objectName_cstr(env, objectName); > > I think it would be better to update AutoJavaString class to handle null > strings: > `m_buf(str == NULL ? NULL : env->GetStringUTFChars(str, NULL)) ` The point is the argument is ignored, so it doesn't really matter if AutoJavaString can handle NULL. I assume with your suggested fix that also want me to pass objectName_cstr to lookup_symbol() rather than an explicit NULL. I wanted the NULL to be explicit to help further convey that objectName is ignored. ------------- PR: https://git.openjdk.java.net/jdk/pull/2567