JDK-8257467 : [TESTBUG] -Wdeprecated-declarations is reported at sigset() in exesigtest.c
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 16
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2020-12-01
  • Updated: 2022-09-16
  • Resolved: 2020-12-02
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 11 JDK 13 JDK 15 JDK 16
11.0.15Fixed 13.0.13Fixed 15.0.9Fixed 16 b27Fixed
Related Reports
Relates :  
Description
`sigset()` is deprecated, and `__attribute_deprecated_msg__` has been set to the declaration in glibc [1]

We can see the warning on `make test-image` as below:

* Fedora 33 x86_64
    * gcc: gcc-10.2.1-6.fc33.x86_64
    * glibc: glibc-2.32-2.fc33.x86_64

```
/home/ysuenaga/github-forked/jdk/test/hotspot/jtreg/runtime/signal/exesigtest.c: In function 'setSignalHandler':
/home/ysuenaga/github-forked/jdk/test/hotspot/jtreg/runtime/signal/exesigtest.c:245:9: error: 'sigset' is deprecated: Use the signal and sigprocmask functions instead [-Werror=deprecated-declarations]
  245 |         sigset(signal_num, handler);
      |         ^~~~~~
In file included from /home/ysuenaga/github-forked/jdk/test/hotspot/jtreg/runtime/signal/exesigtest.c:25:
/usr/include/signal.h:353:23: note: declared here
  353 | extern __sighandler_t sigset (int __sig, __sighandler_t __disp) __THROW
      |                       ^~~~~~
cc1: all warnings being treated as errors
gmake[3]: *** [test/JtregNativeHotspot.gmk:1525: /home/ysuenaga/github-forked/jdk/build/linux-x86_64-server-fastdebug/support/test/hotspot/jtreg/native/support/exesigtest/exesigtest.o] Error 1
gmake[3]: *** Waiting for unfinished jobs....
gmake[2]: *** [make/Main.gmk:612: build-test-hotspot-jtreg-native] Error 2
```

[1] https://sourceware.org/git/?p=glibc.git;a=commit;f=signal/signal.h;h=02802fafcf6e11ea3f998f685035ffe568dfddeb
Comments
A pull request was submitted for review. URL: https://git.openjdk.org/jdk13u-dev/pull/408 Date: 2022-09-16 08:42:08 +0000
16-09-2022

Fix request (15u, 13u): clean backport; gcc 10 with libc 2.34 builds test-image OK.
16-09-2022

A pull request was submitted for review. URL: https://git.openjdk.org/jdk15u-dev/pull/275 Date: 2022-09-12 11:23:37 +0000
12-09-2022

Fix Request (11u). PR: https://github.com/openjdk/jdk11u-dev/pull/675 Clean backport, fixes test to build using GCC 11.
30-11-2021

Changeset: fb139cff Author: Yasumasa Suenaga <ysuenaga@openjdk.org> Date: 2020-12-02 09:06:02 +0000 URL: https://git.openjdk.java.net/jdk/commit/fb139cff
02-12-2020

ILW = HLM = P3
01-12-2020

Moving from hotspot/test -> hotspot/runtime. Test bugs are usually placed in the component cat/subcat.
01-12-2020