-
Bug
-
Resolution: Fixed
-
P4
-
11, 15, 16
-
b18
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8256988 | 15u-cpu | Paul Hohensee | P4 | Resolved | Fixed | master |
JDK-8256403 | 15.0.2 | Paul Hohensee | P4 | Resolved | Fixed | b06 |
JDK-8255587 | 13.0.6 | Paul Hohensee | P4 | Resolved | Fixed | b01 |
JDK-8253955 | 11.0.10-oracle | Paul Hohensee | P4 | Resolved | Fixed | b01 |
JDK-8253933 | 11.0.10 | Paul Hohensee | P4 | Resolved | Fixed | b01 |
JDK-8267261 | openjdk8u302 | Paul Hohensee | P4 | Resolved | Fixed | b04 |
/Users/hohensee/workspaces/jdk/src/hotspot/share/runtime/sharedRuntime.cpp:2849:85: error: expression does not compute the number of elements in this array; element type is 'double', not 'relocInfo' [-Werror,-Wsizeof-array-div]
buffer.insts()->initialize_shared_locs((relocInfo*)locs_buf, sizeof(locs_buf) / sizeof(relocInfo));
~~~~~~~~ ^
/Users/hohensee/workspaces/jdk/src/hotspot/share/runtime/sharedRuntime.cpp:2848:14: note: array 'locs_buf' declared here
double locs_buf[20];
^
/Users/hohensee/workspaces/jdk/src/hotspot/share/runtime/sharedRuntime.cpp:2849:85: note: place parentheses around the 'sizeof(relocInfo)' expression to silence this warning
buffer.insts()->initialize_shared_locs((relocInfo*)locs_buf, sizeof(locs_buf) / sizeof(relocInfo));
^
1 error generated.
Correct code to do the same thing exists in src/hotspot/share/c1/c1_Compilation.cpp at line 325, vis
int locs_buffer_size = 20 * (relocInfo::length_limit + sizeof(relocInfo));
char* locs_buffer = NEW_RESOURCE_ARRAY(char, locs_buffer_size);
code->insts()->initialize_shared_locs((relocInfo*)locs_buffer,
locs_buffer_size / sizeof(relocInfo));
A quick fix would be just to copy it into sharedRuntime.cpp, but a better one would define a macro in relocInfo.hpp for use in such circumstances, e.g.
#define RELOCINFO_BUFFER_SIZE (20 * (relocInfo::length_limit + sizeof(relocInfo)))
- backported by
-
JDK-8253933 OSX build fails with Xcode 12.0 (12A7209)
- Resolved
-
JDK-8253955 OSX build fails with Xcode 12.0 (12A7209)
- Resolved
-
JDK-8255587 OSX build fails with Xcode 12.0 (12A7209)
- Resolved
-
JDK-8256403 OSX build fails with Xcode 12.0 (12A7209)
- Resolved
-
JDK-8256988 OSX build fails with Xcode 12.0 (12A7209)
- Resolved
-
JDK-8267261 OSX build fails with Xcode 12.0 (12A7209)
- Resolved
- duplicates
-
JDK-8253302 hotspot build warning in src/hotspot/share/runtime/sharedRuntime.cpp with clang version 12.0.0
- Closed
- relates to
-
JDK-8253868 CodeSection::initialize_shared_locs buffer argument types and sizes are opaque
- Open