Bug #75739 Fix some compile errors in server code
Submitted: 3 Feb 2015 5:21 Modified: 9 Mar 2015 21:27
Reporter: Anitha Gopi Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Optimizer Severity:S3 (Non-critical)
Version:5.6 OS:Any
Assigned to: CPU Architecture:Any

[3 Feb 2015 5:21] Anitha Gopi
Description:
This is a request from webscale and Tor thinks it is acceptable. 

https://github.com/webscalesql/webscalesql-5.6/commit/a49907fc60994ca2c73e5a25767f3937bfd6...

How to repeat:
Examine code 

Suggested fix:

@@ -2383,7 +2383,7 @@ static void network_init(void)
returned by getaddrinfo();
*/
- struct addrinfo *a;
+ struct addrinfo *a = NULL;
ip_sock= create_socket(ai, AF_INET, &a);
if (mysql_socket_getfd(ip_sock) == INVALID_SOCKET)
4  strings/ctype-utf8.c
@@ -8298,7 +8298,7 @@ my_strnncoll_utf8mb4(const CHARSET_INFO *cs,
const uchar *t, size_t tlen,
my_bool t_is_prefix)
{
- my_wc_t s_wc,t_wc;
+ my_wc_t UNINIT_VAR(s_wc), t_wc;
const uchar *se= s + slen;
const uchar *te= t + tlen;
MY_UNICASE_INFO *uni_plane= cs->caseinfo;
@@ -8366,7 +8366,7 @@ my_strnncollsp_utf8mb4(const CHARSET_INFO *cs,
my_bool diff_if_only_endspace_difference)
{
int res;
- my_wc_t s_wc, t_wc;
+ my_wc_t UNINIT_VAR(s_wc), t_wc;
const uchar *se= s + slen, *te= t + tlen;
MY_UNICASE_INFO *uni_plane= cs->caseinfo;
LINT_INIT(s_wc);
[9 Mar 2015 21:27] Paul DuBois
Noted in 5.6.25, 5.7.7, 5.8.0 changelogs.

AddressSanitizer compilation errors were silenced.
[1 Apr 2015 5:08] Erlend Dahl
Bug#75914 validate_gc_assignment warning: ‘fld’ may be used uninitialized in this function

was marked as a duplicate.
[23 Jun 2015 15:20] Laurynas Biveinis
commit b54e24348d792699b83b6c58466dc46b2f3a64fa
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Tue Feb 24 17:21:02 2015 +0100

    Bug#20459338 FIX SOME COMPILE ERRORS IN SERVER CODE
    
    This patch is based on
    from https://github.com/webscalesql/webscalesql-5.6
    patch a49907fc6
    
    Fix errors detected by ASan at compile time