Bug #59241 | invalid memory read in do_div_mod with doubly assigned variables | ||
---|---|---|---|
Submitted: | 31 Dec 2010 9:36 | Modified: | 29 Jan 2011 23:11 |
Reporter: | Shane Bester (Platinum Quality Contributor) | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: DML | Severity: | S2 (Serious) |
Version: | 5.6.2, 5.5 | OS: | Any |
Assigned to: | Tor Didriksen | CPU Architecture: | Any |
Tags: | regression |
[31 Dec 2010 9:36]
Shane Bester
[31 Dec 2010 12:15]
Sveta Smirnova
Thank you for the report. Verified as described.
[5 Jan 2011 14:45]
Øystein Grøvlen
This issue was introduced by the fix for Bug#8457. It also exists in 5.5 branch (probably since 5.5.3). Hence, I guess it it should be retriaged.
[11 Jan 2011 21:41]
Omer Barnir
triage: change from SR56RC to SR55MRU as exists there as well
[13 Jan 2011 11:38]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/128637 3498 Tor Didriksen 2011-01-13 Bug #59241 invalid memory read in do_div_mod with doubly assigned variables Fix: copy my_decimal by value, to avoid dangling pointers. @ mysql-test/r/func_math.result New test case. @ mysql-test/t/func_math.test New test case. @ sql/item_cmpfunc.cc No need to call fix_buffer_pointer() anymore. @ sql/item_func.cc Copy my_decimal by value, to avoid dangling pointers. @ sql/my_decimal.h Implement proper copy constructor and assignment operator for my_decimal. @ sql/sql_analyse.cc No need to call fix_buffer_pointer() anymore. @ strings/decimal.c Remove #line directive: it messes up TAGS and it confuses gdb when debugging. @ unittest/gunit/CMakeLists.txt New unit test. @ unittest/gunit/my_decimal-t.cc Unit test for my_decimal copy constructor and assignment operator.
[14 Jan 2011 9:05]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/128702 3242 Tor Didriksen 2011-01-14 Bug #59241 invalid memory read in do_div_mod with doubly assigned variables Fix: copy my_decimal by value, to avoid dangling pointers. @ mysql-test/r/func_math.result New test case. @ mysql-test/t/func_math.test New test case. @ sql/item_cmpfunc.cc No need to call fix_buffer_pointer() anymore. @ sql/item_func.cc Copy my_decimal by value, to avoid dangling pointers. @ sql/my_decimal.h Implement proper copy constructor and assignment operator for my_decimal. @ sql/sql_analyse.cc No need to call fix_buffer_pointer() anymore. @ strings/decimal.c Remove #line directive: it messes up TAGS and it confuses gdb when debugging.
[14 Jan 2011 9:29]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/128703 3504 Tor Didriksen 2011-01-14 [merge] Merge Bug #59241 from 5.5 @ unittest/gunit/CMakeLists.txt New unit test. @ unittest/gunit/my_decimal-t.cc Unit test for my_decimal copy constructor and assignment operator.
[14 Jan 2011 9:31]
Tor Didriksen
pushed to 5.5 and trunk
[14 Jan 2011 9:31]
Bugs System
Pushed into mysql-trunk 5.6.2 (revid:tor.didriksen@oracle.com-20110114092911-2vu7p7obkao0cfiy) (version source revid:tor.didriksen@oracle.com-20110114092911-2vu7p7obkao0cfiy) (merge vers: 5.6.2) (pib:24)
[14 Jan 2011 9:31]
Bugs System
Pushed into mysql-5.5 5.5.9 (revid:tor.didriksen@oracle.com-20110114090514-n2ixo8vof6sqxuih) (version source revid:tor.didriksen@oracle.com-20110114090514-n2ixo8vof6sqxuih) (merge vers: 5.5.9) (pib:24)
[14 Jan 2011 12:21]
MySQL Verification Team
Tor, did this fix cause bug #59498 ?
[20 Jan 2011 19:28]
Paul DuBois
Noted in 5.5.9, 5.6.2 changelogs. For DIV expressions, assignment of the result to multiple variables could cause a server crash.
[4 Jun 2013 19:08]
Paul DuBois
Noted in 5.1.71 changelog.