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

package info (click to toggle)
mrpt 1%3A2.14.15%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 92,788 kB
  • sloc: cpp: 558,736; ansic: 36,840; xml: 3,864; python: 2,195; sh: 524; makefile: 232
file content (29 lines) | stat: -rw-r--r-- 967 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
From: Jose Luis Blanco Claraco <joseluisblancoc@gmail.com>
Date: Sun, 9 Nov 2025 22:42:12 +0100
Subject: fix-segfault-opengl-memory-corruption

===================================================================
---
 libs/opengl/CMakeLists.txt | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/libs/opengl/CMakeLists.txt b/libs/opengl/CMakeLists.txt
index af09bf0..0f0b653 100644
--- a/libs/opengl/CMakeLists.txt
+++ b/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()