Uploaded image for project: 'Percona Server for MySQL'
  1. Percona Server for MySQL
  2. PS-5328

fil0crypt.h:123:7: error: 'memset_s' was not declared in this scope on illumos

    XMLWordPrintable

    Details

      Description

      Compilation of Percona Server 5.7.24-27 on OpenIndiana 2018.10 (illumos kernel) with both GCC 7.3 and 8.2 for 32-bit as well as 64-bit fails with:

      In file included from /export/home/newman/ws/oi-userland/components/database/percona-server-57/percona-server-5.7.24-27/storage/innobase/buf/buf0buf.cc:74:0:
      {{ /export/home/newman/ws/oi-userland/components/database/percona-server-57/percona-server-5.7.24-27/storage/innobase/include/fil0crypt.h: In destructor 'Cached_key::~Cached_key()':}}
      {{ /export/home/newman/ws/oi-userland/components/database/percona-server-57/percona-server-5.7.24-27/storage/innobase/include/fil0crypt.h:123:7: error: 'memset_s' was not declared in this scope}}
      {{ memset_s(key, ENCRYPTION_KEY_LEN, 0, ENCRYPTION_KEY_LEN);}}
      {{ ^~~~~~~~}}
      {{ /export/home/newman/ws/oi-userland/components/database/percona-server-57/percona-server-5.7.24-27/storage/innobase/include/fil0crypt.h:123:7: note: suggested alternative: 'my_setwd'}}
      {{ memset_s(key, ENCRYPTION_KEY_LEN, 0, ENCRYPTION_KEY_LEN);}}
      {{ ^~~~~~~~}}
      {{ my_setwd}}
      {{ /export/home/newman/ws/oi-userland/components/database/percona-server-57/percona-server-5.7.24-27/storage/innobase/include/fil0crypt.h: In destructor 'fil_space_crypt_t::~fil_space_crypt_t()':}}
      {{ /export/home/newman/ws/oi-userland/components/database/percona-server-57/percona-server-5.7.24-27/storage/innobase/include/fil0crypt.h:196:4: error: 'memset_s' was not declared in this scope}}
      {{ memset_s(*iter, ENCRYPTION_KEY_LEN, 0, ENCRYPTION_KEY_LEN);}}
      {{ ^~~~~~~~}}
      {{ /export/home/newman/ws/oi-userland/components/database/percona-server-57/percona-server-5.7.24-27/storage/innobase/include/fil0crypt.h:196:4: note: suggested alternative: 'my_setwd'}}
      {{ memset_s(*iter, ENCRYPTION_KEY_LEN, 0, ENCRYPTION_KEY_LEN);}}
      {{ ^~~~~~~~}}
      {{ my_setwd}}/export/home/newman/ws/oi-userland/components/database/percona-server-57/percona-server-5.7.24-27/sql/binlog_crypt_data.cc: In member function 'void Binlog_crypt_data::free_key(uchar*&, std::size_t&)':
      {{ /export/home/newman/ws/oi-userland/components/database/percona-server-57/percona-server-5.7.24-27/sql/binlog_crypt_data.cc:62:5: error: 'memset_s' was not declared in this scope}}
      {{ memset_s(key, 512, 0, key_length);}}
      {{ ^~~~~~~~}}
      {{ /export/home/newman/ws/oi-userland/components/database/percona-server-57/percona-server-5.7.24-27/sql/binlog_crypt_data.cc:62:5: note: suggested alternative: 'my_setwd'}}
      {{ memset_s(key, 512, 0, key_length);}}
      {{ ^~~~~~~~}}
      {{ my_setwd}}

      There may be other similar issues.

      Though memset_s is found by CMake:

      – Looking for memset_s
      {{ – Looking for memset_s - found}}

      Version 5.7.22-22 compiles fine (with GCC 6.4).

        Attachments

          Activity

            People

            Assignee:
            laurynas.biveinis Laurynas Biveinis (Inactive)
            Reporter:
            mno-hime Michal Nowak
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - Not Specified
                Not Specified
                Logged:
                Time Spent - 37 minutes
                37m

                  Smart Checklist