-
Notifications
You must be signed in to change notification settings - Fork 482
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PS-7694 [5.7]: Fix compilation issues with gcc-11 #4296
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Fix the following 5.7 Debug issues: ``` pars0grm.cc: In function ‘int yyparse()’: pars0grm.cc:3028:18: error: ‘void free(void*)’ called on unallocated object ‘yyssa’ [-Werror=free-nonheap-object] pars0grm.cc:1766:16: note: declared here cc1plus: all warnings being treated as errors storage/innobase/CMakeFiles/innobase.dir/build.make:1910: recipe for target 'storage/innobase/CMakeFiles/innobase.dir/pars/pars0grm.cc.o' failed /data/mysql-server/percona-5.7-deb-gcc11-rocks-toku/libmysqld/sql_hints.yy.cc: In function ‘int HINT_PARSER_parse(THD*, Hint_scanner*, PT_hint_list**)’: /data/mysql-server/percona-5.7-deb-gcc11-rocks-toku/libmysqld/sql_hints.yy.cc:1947:18: error: ‘void free(void*)’ called on unallocated object ‘yyssa’ [-Werror=free-nonheap-object] 1947 | YYSTACK_FREE (yyss); /data/mysql-server/percona-5.7-deb-gcc11-rocks-toku/libmysqld/sql_hints.yy.cc:1113:18: note: declared here 1113 | yytype_int16 yyssa[YYINITDEPTH]; /data/mysql-server/percona-5.7/testclients/mysql_client_test.c: In function ‘test_bug40365’: /data/mysql-server/percona-5.7/testclients/mysql_client_test.c:18146:5: error: this ‘if’ clause does not guard... [-Werror=misleading-indentation] 18146 | if (!opt_silent) | ^~ In file included from /data/mysql-server/percona-5.7/testclients/mysql_client_test.c:34: /data/mysql-server/percona-5.7/testclients/mysql_client_fw.c:133:1: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 133 | ((void) ((expr) ? 0 : (die(__FILE__, __LINE__, #expr), 0))) | ^ /data/mysql-server/percona-5.7/testclients/mysql_client_test.c:18149:7: note: in expansion of macro ‘DIE_UNLESS’ 18149 | DIE_UNLESS(tm[i].year == 0); In file included from /data/mysql-server/_deps/googletest-release-1.8.0/googletest/include/gtest/gtest.h:1874, from /data/mysql-server/percona-5.7/unittest/gunit/copy_info-t.cc:26, from /data/mysql-server/percona-5.7-deb-gcc11-rocks-toku/unittest/gunit/merge_large_tests.cc:2: /data/mysql-server/percona-5.7/unittest/gunit/strings_utf8-t.cc: In member function ‘virtual void strings_utf8_unittest::StringsUTF8Test_MyIsmbcharUtf8_Test::TestBody()’: /data/mysql-server/percona-5.7/unittest/gunit/strings_utf8-t.cc:192:52: error: ‘<unknown>’ may be used uninitialized [-Werror=maybe-uninitialized] 192 | EXPECT_EQ(0U, system_charset_info->cset->ismbchar(system_charset_info, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~ 193 | utf8_src, utf8_src + 1)); ``` Fix the following 5.7 RelWithDebInfo issues: ``` In file included from /data/mysql-server/percona-5.7/include/mysql/psi/mysql_thread.h:68, from /data/mysql-server/percona-5.7/mysys/mysys_priv.h:32, from /data/mysql-server/percona-5.7/mysys/thr_lock.c:82: In function ‘inline_mysql_cond_init’, inlined from ‘test_thread’ at /data/mysql-server/percona-5.7/mysys/thr_lock.c:1394:3: /data/mysql-server/percona-5.7/include/mysql/psi/psi.h:3005:29: error: ‘COND_thr_lock’ may be used uninitialized [-Werror=maybe-uninitialized] 3005 | #define PSI_DYNAMIC_CALL(M) PSI_server->M /data/mysql-server/percona-5.7/include/mysql/psi/mysql_thread.h:84:26: note: in expansion of macro ‘PSI_DYNAMIC_CALL’ 84 | #define PSI_COND_CALL(M) PSI_DYNAMIC_CALL(M) | ^~~~~~~~~~~~~~~~ /data/mysql-server/percona-5.7/include/mysql/psi/mysql_thread.h:1147:16: note: in expansion of macro ‘PSI_COND_CALL’ 1147 | that->m_psi= PSI_COND_CALL(init_cond)(key, &that->m_cond); In function ‘char* mem_strdupl(const char*, ulint)’, inlined from ‘ulint dict_check_sys_tables(bool)’ at /data/mysql-server/percona-5.7/storage/innobase/dict/dict0load.cc:1548:34, inlined from ‘void dict_check_tablespaces_and_store_max_id(bool)’ at /data/mysql-server/percona-5.7/storage/innobase/dict/dict0load.cc:1696:36: /data/mysql-server/percona-5.7/storage/innobase/include/mem0mem.ic:600:16: error: writing 1 byte into a region of size 0 [-Werror=stringop-overflow=] 600 | s[len] = 0; /data/mysql-server/percona-5.7/sql/opt_range.cc: In function ‘void append_range_all_keyparts(Opt_trace_array*, String*, String*, SEL_ARG*, const KEY_PART_INFO*, bool)’: /data/mysql-server/percona-5.7/sql/opt_range.cc:14909:27: error: ‘this’ pointer is null [-Werror=nonnull] 14909 | range_string->append(STRING_WITH_LEN("...")); In function ‘void* memset(void*, int, size_t)’, inlined from ‘Geometry::Flags_t::Flags_t()’ at /data/mysql-server/percona-5.7/sql/spatial.h:832:13, inlined from ‘Geometry::Geometry(const void*, size_t, const Geometry::Flags_t&, Geometry::srid_t)’ at /data/mysql-server/percona-5.7/sql/spatial.h:877:3, inlined from ‘Gis_point::Gis_point(bool)’ at /data/mysql-server/percona-5.7/sql/spatial.h:1316:59, inlined from ‘objtype* Inplace_vector<objtype, array_size>::append_object() [with objtype = Gis_point; long unsigned int array_size = 16]’ at /data/mysql-server/percona-5.7/sql/inplace_vector.h:161:12, inlined from ‘void Gis_wkb_vector<T>::shallow_push(const Geometry*) [with T = Gis_point]’ at /data/mysql-server/percona-5.7/sql/spatial.cc:4718:51: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:71:33: error: ‘void* __builtin_memset(void*, int, long unsigned int)’ offset [0, 7] is out of the bounds [0, 0] [-Werror=array-bounds] 71 | return __builtin___memset_chk (__dest, __ch, __len, __bos0 (__dest)); In function ‘void* memset(void*, int, size_t)’, inlined from ‘Geometry::Flags_t::Flags_t()’ at /data/mysql-server/percona-5.7/sql/spatial.h:832:13, inlined from ‘Geometry::Geometry(const void*, size_t, const Geometry::Flags_t&, Geometry::srid_t)’ at /data/mysql-server/percona-5.7/sql/spatial.h:877:3, inlined from ‘Gis_point::Gis_point(bool)’ at /data/mysql-server/percona-5.7/sql/spatial.h:1316:59, inlined from ‘objtype* Inplace_vector<objtype, array_size>::append_object() [with objtype = Gis_point; long unsigned int array_size = 16]’ at /data/mysql-server/percona-5.7/sql/inplace_vector.h:161:12, inlined from ‘void Gis_wkb_vector<T>::shallow_push(const Geometry*) [with T = Gis_point]’ at /data/mysql-server/percona-5.7/sql/spatial.cc:4718:51: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:71:33: error: ‘void* __builtin_memset(void*, int, long unsigned int)’ writing 8 bytes into a region of size 0 overflows the destination [-Werror=stringop-overflow=] 71 | return __builtin___memset_chk (__dest, __ch, __len, __bos0 (__dest)); ```
percona-ysorokin
approved these changes
May 11, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix the following 5.7 Debug issues:
Fix the following 5.7 RelWithDebInfo issues: