JDK-8219675 : Disable harfbuzz warnings with gcc 8
  • Type: Enhancement
  • Component: client-libs
  • Sub-Component: 2d
  • Affected Version: 13
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: linux
  • CPU: x86_64
  • Submitted: 2019-02-25
  • Updated: 2019-02-28
  • Resolved: 2019-02-26
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 13
13 b10Fixed
Related Reports
Relates :  
Relates :  
When building with GCC 8 (GCC 8.2 to be specific), a number of warnings are being generated for the harfbuzz related files:

For example:

n file included from /home/mikael/src/jdk/jdk/open/src/java.desktop/share/native/libfontmanager/harfbuzz/hb-blob.cc:34:
/home/mikael/src/jdk/jdk/open/src/java.desktop/share/native/libfontmanager/harfbuzz/hb-debug.hh:130:1: error: explicit specialization 'void _hb_debug_msg_va(const char*, const void*, const char*, bool, unsigned int, int, const char*, __va_list_tag*) [with int max_level = 0]' may be missing attributes [-Werror=missing-attributes]
 _hb_debug_msg_va<0> (const char *what HB_UNUSED,
In file included from /home/mikael/src/jdk/jdk/open/src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-cmap-table.hh:31,
                 from /home/mikael/src/jdk/jdk/open/src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-font.cc:33:
/home/mikael/src/jdk/jdk/open/src/java.desktop/share/native/libfontmanager/harfbuzz/hb-set-private.hh: In member function 'void hb_set_t::page_t::init1()':
/home/mikael/src/jdk/jdk/open/src/java.desktop/share/native/libfontmanager/harfbuzz/hb-set-private.hh:54:60: error: 'void* memset(void*, int, size_t)' writing to an object of type 'hb_set_t::page_t::vector_t' {aka 'struct hb_vector_size_t<long long unsigned int, 64>'} with 'private' member 'hb_vector_size_t<long long unsigned int, 64>::u' [-Werror=class-memaccess]
     inline void init1 (void) { memset (&v, 0xff, sizeof (v)); }

The warnings are all one of:

* missing-attributes
* class-memaccess

JDK-8210782 is looking at upgrading harfbuzz to version 2.3.1, in which the code and the warnings are not produced. While that upgrade is being worked on the two warnings should be disabled so that progress can be made on upgrading the toolchain (to be re-enabled after the harfbuzz upgrade).