From d96e2037e39f335c0c40a89fa9dd05a6f34da92b Mon Sep 17 00:00:00 2001
From: elsid <elsid.mail@gmail.com>
Date: Thu, 17 Feb 2022 01:27:25 +0100
Subject: [PATCH] Build tests by gcc with enabled stdlibc++ assertions in debug
 mode

This can catch some problems in the code like out of bounds access for
string_view element via operator[] when it refers a buffer larger than the
view.
---
 .gitlab-ci.yml | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index aaf7f233f0..4c5223c212 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -116,11 +116,12 @@ Ubuntu_GCC_tests:
 Ubuntu_GCC_tests_Debug:
   extends: Ubuntu_GCC
   cache:
-    key: Ubuntu_GCC_tests_Debug.v1
+    key: Ubuntu_GCC_tests_Debug.v2
   variables:
     CCACHE_SIZE: 1G
     BUILD_TESTS_ONLY: 1
     CMAKE_BUILD_TYPE: Debug
+    CMAKE_CXX_FLAGS_DEBUG: -g -O0 -D_GLIBCXX_ASSERTIONS
   artifacts:
     paths: []
     expire_in: 1 minute