File: 001-fix-segfault-opengl-memory-corruption.patch

package info (click to toggle)
mrpt 1%3A2.14.15%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 92,780 kB
  • sloc: cpp: 558,736; ansic: 36,840; xml: 3,864; python: 2,195; sh: 524; makefile: 236
file content (20 lines) | stat: -rw-r--r-- 712 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Index: mrpt-salsa/libs/opengl/CMakeLists.txt
===================================================================
--- mrpt-salsa.orig/libs/opengl/CMakeLists.txt
+++ mrpt-salsa/libs/opengl/CMakeLists.txt
@@ -43,6 +43,15 @@ if(NOT BUILD_mrpt-opengl)
   return()
 endif()
 
+# Workaround to Debian bug https://bugs.debian.org/1115155
+# Apparently caused by memory corruption in the vtable of these classes,
+# but neither sanitizers, nor valgrind detect anything wrong.
+set_source_files_properties(
+    src/CRenderizableShaderTriangles.cpp
+    src/CTexturedPlane.cpp
+    PROPERTIES COMPILE_OPTIONS "-O1"
+)
+
 if (MRPT_OPENGL_PROFILER)
 	target_compile_definitions(opengl PRIVATE MRPT_OPENGL_PROFILER)
 endif()