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

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Pending Release
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: Not 5.6, 5.7.24-26
    • Fix Version/s: 5.7.25-28, 8.0.NEXT
    • Component/s: None
    • Environment:

      OpenIndiana 2018.10 (illumos kernel)

      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).

        Smart Checklist

          Attachments

            Activity

              People

              • Assignee:
                laurynas.biveinis Laurynas Biveinis
                Reporter:
                mno-hime Michal Nowak
              • Votes:
                0 Vote for this issue
                Watchers:
                4 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