Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8257467

[TESTBUG] -Wdeprecated-declarations is reported at sigset() in exesigtest.c

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b27

      Backports

        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

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                ysuenaga Yasumasa Suenaga
                Reporter:
                ysuenaga Yasumasa Suenaga
                Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: