| Bug #59111 | gis crashes when server is compiled without performance schema | ||
|---|---|---|---|
| Submitted: | 22 Dec 2010 10:40 | Modified: | 9 Feb 2011 4:59 |
| Reporter: | Alfranio Tavares Correia Junior | Email Updates: | |
| Status: | Closed | Impact on me: | |
| Category: | MySQL Server: GIS | Severity: | S3 (Non-critical) |
| Version: | 5.6+ | OS: | Any |
| Assigned to: | Tor Didriksen | CPU Architecture: | Any |
| Tags: | crash, gis | ||
[22 Dec 2010 10:40]
Alfranio Tavares Correia Junior
[22 Dec 2010 20:54]
Sveta Smirnova
Thank you for the report. Verified as described.
[20 Jan 2011 11:35]
Tor Didriksen
These three tests crash consistently in optimized mode for me, regardless of perf schema. The problem seems to be pointer aliasing.
[20 Jan 2011 13:14]
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/129276 3538 Tor Didriksen 2011-01-20 Bug #59111 gis crashes when server is compiled without performance schema The crash was due to pointer aliasing, nothing to do with perf.schema. @ sql/gcalc_slicescan.cc Use proper type for result_hook in new_slice(). Then static_cast<> before returning result (this was the bug). Cleanup some C-style casts, use reinterpret_cast instead. Move declarations closer to where they are actually needed. Remove the recursion between alloc_new_block() and new_item() @ sql/gcalc_slicescan.h Remove the recursion between alloc_new_block() and new_item() (it looked suspicious)
[31 Jan 2011 10:32]
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/130030 3580 Tor Didriksen 2011-01-31 Bug #59111 gis crashes when server is compiled without performance schema The crash was due to pointer aliasing, nothing to do with perf.schema. @ sql/gcalc_slicescan.cc Use proper type for result_hook in new_slice(). Then static_cast<> before returning result (this was the bug). Cleanup some C-style casts, use reinterpret_cast instead. Move declarations closer to where they are actually needed. Remove the recursion between alloc_new_block() and new_item() @ sql/gcalc_slicescan.h Remove the recursion between alloc_new_block() and new_item() (it looked suspicious)
[3 Feb 2011 12:29]
Alexander Barkov
The patch looks Ok to push.
Consider suggestion changing return type for alloc_new_blk()
to bool, to report errors to the caller:
>> bool Gcalc_dyn_list::alloc_new_blk()
>> {
>> void *new_block= my_malloc(m_blk_size, MYF(MY_WME));
>> if (!new_block)
>> return true;
>> *m_blk_hook= new_block;
>> m_blk_hook= (void**)new_block;
>> format_blk(new_block);
>> return false;
>> }
>>
>> So new_item() can be easier to read:
>>
>> Item *new_item()
>> {
>> if (!m_free && alloc_new_blk())
>> return NULL;
>> DBUG_ASSERT(m_free);
>> Item *result= m_free;
>> m_free= m_free->next;
>> result->next= NULL;
>> return result;
>> }
>>
[3 Feb 2011 12:30]
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/130314 3596 Tor Didriksen 2011-02-03 Bug #59111 gis crashes when server is compiled without performance schema The crash was due to pointer aliasing, nothing to do with perf.schema. @ sql/gcalc_slicescan.cc Use proper type for result_hook in new_slice(). Then static_cast<> before returning result (this was the bug). Cleanup some C-style casts, use reinterpret_cast instead. Move declarations closer to where they are actually needed. Remove the recursion between alloc_new_block() and new_item() @ sql/gcalc_slicescan.h Remove the recursion between alloc_new_block() and new_item() (it looked suspicious)
[3 Feb 2011 13:51]
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/130317 3597 Tor Didriksen 2011-02-03 Bug #59111 gis crashes when server is compiled without performance schema The crash was due to pointer aliasing, nothing to do with perf.schema. @ sql/gcalc_slicescan.cc Use proper type for result_hook in new_slice(). Then static_cast<> before returning result (this was the bug). Cleanup some C-style casts, use reinterpret_cast instead. Move declarations closer to where they are actually needed. Remove the recursion between alloc_new_block() and new_item() @ sql/gcalc_slicescan.h Remove the recursion between alloc_new_block() and new_item() (it looked suspicious)
[3 Feb 2011 13:51]
Bugs System
Pushed into mysql-trunk 5.6.2 (revid:[email protected]) (version source revid:[email protected]) (merge vers: 5.6.2) (pib:24)
[4 Feb 2011 8:23]
Tor Didriksen
The crash depends on compiler version and compiler flags and optimization level. I don't think it is seen in released versions, because this patch Bug#42733: Type-punning warnings when compiling MySQL -- strict aliasing violations.
[9 Feb 2011 4:59]
Paul DuBois
Not present in released versions - no changelog entry needed.
