[MDEV-2366] LP:482100 - Valgrind warning and garbled output from innodb_file_format_name_update() Created: 2009-11-13 Updated: 2012-10-04 Resolved: 2012-10-04 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Kristian Nielsen | Assignee: | Kristian Nielsen |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | Launchpad | ||
| Attachments: |
|
| Description |
|
Using this test case (simplified from innodb_xtradb_bug317074.test): ----------------------------------------------------------------------- SET @old_innodb_file_format=@@innodb_file_format; SET GLOBAL innodb_file_format=@old_innodb_file_format; perl mysql-test-run.pl --valgrind innodb-kn I get this warning and stack trace: ==27371== Conditional jump or move depends on uninitialised value(s) I also get a spurious warning due to reading garbage data in I found bug 461155, which may be related. But I checked the fix committed as I will debug to investigate. |
| Comments |
| Comment by Kristian Nielsen [ 2009-11-13 ] |
|
Re: Valgrind warning and garbled output from innodb_file_format_name_update() |
| Comment by Kristian Nielsen [ 2009-11-13 ] |
|
Re: Valgrind warning and garbled output from innodb_file_format_name_update() It is in innodb_file_format_check_validate(), in ha_innodb.cc char buff[STRING_BUFFER_USUAL_SIZE]; So the file_format_input string is stored in a local buffer on the stack, but the pointer to it is used after return of the function, which is illegal of course. |
| Comment by Kristian Nielsen [ 2009-11-13 ] |
|
Re: Valgrind warning and garbled output from innodb_file_format_name_update() |
| Comment by Kristian Nielsen [ 2009-11-13 ] |
|
Ok, attached is a patch that fixes the problem. |
| Comment by Kristian Nielsen [ 2009-11-13 ] |
|
Re: Valgrind warning and garbled output from innodb_file_format_name_update() |
| Comment by Kristian Nielsen [ 2009-11-13 ] |
|
Re: Valgrind warning and garbled output from innodb_file_format_name_update() Again, this patch is offered to Percona under the simplified BSD license. |
| Comment by Kristian Nielsen [ 2009-11-13 ] |
|
Sorry, previous patch is buggy, the memory need to be allocated on the THD memroot so it will be freed automatically, freeing in update does not work. Again, this patch is offered to Percona under the simplified BSD license. |
| Comment by Kristian Nielsen [ 2009-11-28 ] |
|
Re: Valgrind warning and garbled output from innodb_file_format_name_update() |
| Comment by Stewart Smith [ 2011-06-07 ] |
|
Re: Valgrind warning and garbled output from innodb_file_format_name_update() Thanks, |
| Comment by Rasmus Johansson (Inactive) [ 2011-06-07 ] |
|
Launchpad bug id: 482100 |