Bug #59906 | 5.5 debug builds broken by extra/comp_err.c | ||
---|---|---|---|
Submitted: | 2 Feb 2011 22:38 | Modified: | 2 Mar 2011 3:44 |
Reporter: | Mark Callaghan | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Compiling | Severity: | S3 (Non-critical) |
Version: | 5.5 | OS: | Any |
Assigned to: | Tor Didriksen | CPU Architecture: | Any |
Tags: | debug |
[2 Feb 2011 22:38]
Mark Callaghan
[3 Feb 2011 9:01]
Valeriy Kravchuk
I can not repeat this problem with current mysql-5.5 tree on 32-bit Ubuntu 10.04 using: gcc (Ubuntu 4.4.3-4ubuntu5) 4.4.3 for whatever reason. But code in extra/comp_err.c is still the same: static int create_header_files(struct errors *error_head) { uint er_last; FILE *er_definef, *sql_statef, *er_namef; struct errors *tmp_error; struct message *er_msg; const char *er_text; DBUG_ENTER("create_header_files"); LINT_INIT(er_last); ... and, theoretically, LINT_INIT macro defined in include/my_global.h as follows: /* Deprecated workaround for false-positive uninitialized variables warnings. Those should be silenced using tool-specific heuristics. Enabled by default for g++ due to the bug referenced below. */ #if defined(_lint) || defined(FORCE_INIT_OF_VARS) || \ (defined(__GNUC__) && defined(__cplusplus)) #define LINT_INIT(var) var= 0 #else #define LINT_INIT(var) #endif should take care of initialization... but I think your suggested change in code will do that even better. So, let's say this is verified by code review.
[2 Mar 2011 3:44]
Paul DuBois
Noted in 5.5.11, 5.6.2 changelogs. On some systems, debug builds of comp_err.c could fail due to an uninitialized variable. CHANGESET - http://lists.mysql.com/commits/131432