Details
-
Bug
-
Resolution: Fixed
-
P4
-
9.0.1, 11
-
b06
-
x86_64
-
linux
Backports
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8256546 | 11.0.11-oracle | Dukebot | P4 | Resolved | Fixed | b01 |
JDK-8252805 | 11.0.10 | David Buck | P4 | Resolved | Fixed | b01 |
JDK-8214603 | 8u211 | David Buck | P4 | Resolved | Fixed | b01 |
JDK-8208629 | 8u202 | David Buck | P4 | Resolved | Fixed | b01 |
JDK-8220856 | emb-8u211 | David Buck | P4 | Resolved | Fixed | master |
Description
FULL PRODUCT VERSION :
java version "9.0.1"
Java(TM) SE Runtime Environment (build 9.0.1+11)
Java HotSpot(TM) 64-Bit Server VM (build 9.0.1+11, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Linux 2.6.32-504.30.3.el6.x86_64 #1 SMP Wed Jul 15 10:13:09 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
A DESCRIPTION OF THE PROBLEM :
Binutils 2.2.9 changed API and disassembler() constructor now requires more parameters. See patch.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Download binutils-2.29 or later, e.g.
BINUTILS=build/binutils-2.29.1 CC=icc LP64=1 make
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
compilation successs
ACTUAL -
compilation error
ERROR MESSAGES/STACK TRACES THAT OCCUR :
hsdis.c: In function ‘setup_app_data’:
hsdis.c:315: error: incompatible type for argument 1 of ‘disassembler’
src/share/tools/hsdis/build/binutils-2.29.1/include/dis-asm.h:276: note: expected ‘enum bfd_architecture’ but argument is of type ‘struct bfd *’
hsdis.c:315: error: too few arguments to function ‘disassembler’
make: *** [build/linux-amd64/hsdis-amd64.so] Error 1
REPRODUCIBILITY :
This bug can be reproduced always.
CUSTOMER SUBMITTED WORKAROUND :
diff --git a/src/share/tools/hsdis/hsdis.c b/src/share/tools/hsdis/hsdis.c
index 3d038f1..88122fb 100644
--- a/src/share/tools/hsdis/hsdis.c
+++ b/src/share/tools/hsdis/hsdis.c
@@ -30,6 +30,7 @@
#include <config.h> /* required by bfd.h */
#include <libiberty.h>
#include <bfd.h>
+#include <bfdver.h>
#include <dis-asm.h>
#include <inttypes.h>
#include <string.h>
@@ -312,7 +313,13 @@ static void setup_app_data(struct hsdis_app_data* app_data,
/* Finish linking together the various callback blocks. */
app_data->dinfo.application_data = (void*) app_data;
- app_data->dfn = disassembler(native_bfd);
+ app_data->dfn = disassembler(
+#if BFD_VERSION >= 229000000
+ bfd_get_arch(native_bfd),
+ bfd_big_endian(native_bfd),
+ bfd_get_mach(native_bfd),
+#endif
+ native_bfd);
app_data->dinfo.print_address_func = hsdis_print_address_func;
app_data->dinfo.read_memory_func = hsdis_read_memory_func;
java version "9.0.1"
Java(TM) SE Runtime Environment (build 9.0.1+11)
Java HotSpot(TM) 64-Bit Server VM (build 9.0.1+11, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Linux 2.6.32-504.30.3.el6.x86_64 #1 SMP Wed Jul 15 10:13:09 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
A DESCRIPTION OF THE PROBLEM :
Binutils 2.2.9 changed API and disassembler() constructor now requires more parameters. See patch.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Download binutils-2.29 or later, e.g.
BINUTILS=build/binutils-2.29.1 CC=icc LP64=1 make
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
compilation successs
ACTUAL -
compilation error
ERROR MESSAGES/STACK TRACES THAT OCCUR :
hsdis.c: In function ‘setup_app_data’:
hsdis.c:315: error: incompatible type for argument 1 of ‘disassembler’
src/share/tools/hsdis/build/binutils-2.29.1/include/dis-asm.h:276: note: expected ‘enum bfd_architecture’ but argument is of type ‘struct bfd *’
hsdis.c:315: error: too few arguments to function ‘disassembler’
make: *** [build/linux-amd64/hsdis-amd64.so] Error 1
REPRODUCIBILITY :
This bug can be reproduced always.
CUSTOMER SUBMITTED WORKAROUND :
diff --git a/src/share/tools/hsdis/hsdis.c b/src/share/tools/hsdis/hsdis.c
index 3d038f1..88122fb 100644
--- a/src/share/tools/hsdis/hsdis.c
+++ b/src/share/tools/hsdis/hsdis.c
@@ -30,6 +30,7 @@
#include <config.h> /* required by bfd.h */
#include <libiberty.h>
#include <bfd.h>
+#include <bfdver.h>
#include <dis-asm.h>
#include <inttypes.h>
#include <string.h>
@@ -312,7 +313,13 @@ static void setup_app_data(struct hsdis_app_data* app_data,
/* Finish linking together the various callback blocks. */
app_data->dinfo.application_data = (void*) app_data;
- app_data->dfn = disassembler(native_bfd);
+ app_data->dfn = disassembler(
+#if BFD_VERSION >= 229000000
+ bfd_get_arch(native_bfd),
+ bfd_big_endian(native_bfd),
+ bfd_get_mach(native_bfd),
+#endif
+ native_bfd);
app_data->dinfo.print_address_func = hsdis_print_address_func;
app_data->dinfo.read_memory_func = hsdis_read_memory_func;
Attachments
Issue Links
- backported by
-
JDK-8208629 hsdis disassembler plugin does not compile with binutils 2.29+
- Resolved
-
JDK-8214603 hsdis disassembler plugin does not compile with binutils 2.29+
- Resolved
-
JDK-8220856 hsdis disassembler plugin does not compile with binutils 2.29+
- Resolved
-
JDK-8252805 hsdis disassembler plugin does not compile with binutils 2.29+
- Resolved
-
JDK-8256546 hsdis disassembler plugin does not compile with binutils 2.29+
- Resolved