[mapguide-commits] r8844 - trunk/MgDev/Oem/agg-2.4/include
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Mon Nov 30 06:57:05 PST 2015
Author: jng
Date: 2015-11-30 06:57:05 -0800 (Mon, 30 Nov 2015)
New Revision: 8844
Modified:
trunk/MgDev/Oem/agg-2.4/include/agg_font_cache_manager.h
Log:
#2578: Fix instability on Ubuntu 14.04 due to segfaulting AGG renderer. On Ubuntu 14.04, the use of memcpy() in agg::font_cache_pool::font() involves overlapping memory addresses (as reported by valgrind). This results in eventual segfault due to freeing a part of font_cache pointer in the m_fonts array when the AGG renderer is cleaned up.
Changing memcpy() to memmove() fixes the issue.
Modified: trunk/MgDev/Oem/agg-2.4/include/agg_font_cache_manager.h
===================================================================
--- trunk/MgDev/Oem/agg-2.4/include/agg_font_cache_manager.h 2015-11-23 12:49:59 UTC (rev 8843)
+++ trunk/MgDev/Oem/agg-2.4/include/agg_font_cache_manager.h 2015-11-30 14:57:05 UTC (rev 8844)
@@ -172,8 +172,8 @@
if(m_num_fonts >= m_max_fonts)
{
obj_allocator<font_cache>::deallocate(m_fonts[0]);
- memcpy(m_fonts,
- m_fonts + 1,
+ memmove(m_fonts,
+ m_fonts + 1,
(m_max_fonts - 1) * sizeof(font_cache*));
m_num_fonts = m_max_fonts - 1;
}
More information about the mapguide-commits
mailing list