Eclipse OpenJ9: A Java Virtual Machine for OpenJDK that's optimized for small footprint, fast start-up, and high throughput. Builds on Eclipse OMR (https://github.com/eclipse/omr) and combines with the Extensions for OpenJDK for OpenJ9 repo.
Other
3.28k
stars
722
forks
source link
Build error: "storing the address of local variable" in runtime/rastrace/trcmain.c #20171
The memory region for tempThr in the stack can be overwritten by other functions.
I think J9VMDllMain() should prepare the memory region for UtThreadData, as J9VMDllMain() seems to be the only caller of initializeTrace().
Building OpenJ9 Java 17 with GCC 13.2.0 on Ubuntu 24.04.1 generates the following error:
https://github.com/eclipse-openj9/openj9/blob/0985ff3f82bfdf1944c81f6242466fcbae2308b5/runtime/rastrace/trcmain.c#L1045
tempThr
is a local variable ininitializeTrace()
.thr
is the first argument forinitializeTrace()
. The address oftempThr
is used byJ9VMDllMain()
in trcengine.c, the caller ofinitializeTrace()
. https://github.com/eclipse-openj9/openj9/blob/0985ff3f82bfdf1944c81f6242466fcbae2308b5/runtime/rastrace/trcengine.c#L363The memory region for
tempThr
in the stack can be overwritten by other functions. I thinkJ9VMDllMain()
should prepare the memory region forUtThreadData
, asJ9VMDllMain()
seems to be the only caller ofinitializeTrace()
.