From 9611d8d05eeb49edb8c9029f907609312ee893f9 Mon Sep 17 00:00:00 2001
From: Georgy Moshkin <gmoshkin@picodata.io>
Date: Thu, 19 Oct 2023 13:23:03 +0300
Subject: [PATCH] core: change bug report destination to picodata related one

NO_DOC=internal change
NO_TEST=internal change
---
 changelogs/unreleased/bug-report-url.md | 8 ++++++++
 src/lib/core/crash.c                    | 7 +++++--
 2 files changed, 13 insertions(+), 2 deletions(-)
 create mode 100644 changelogs/unreleased/bug-report-url.md

diff --git a/changelogs/unreleased/bug-report-url.md b/changelogs/unreleased/bug-report-url.md
new file mode 100644
index 0000000000..581fbec46d
--- /dev/null
+++ b/changelogs/unreleased/bug-report-url.md
@@ -0,0 +1,8 @@
+## feature/core
+
+When crashing a message will now direct users to report bugs at support@picodata.io.
+This info can also be changed at build time by adding a preprocessor definition
+for `PICODATA_BUG_REPORT_INFO`, e.g. by adding this line to a `CMakeLists.txt`:
+```cmake
+add_definitions(-DPICODATA_BUG_REPORT_INFO="support@picodata.io")
+```
diff --git a/src/lib/core/crash.c b/src/lib/core/crash.c
index 55825d3db5..9be7390969 100644
--- a/src/lib/core/crash.c
+++ b/src/lib/core/crash.c
@@ -16,6 +16,10 @@
 #include "crash.h"
 #include "say.h"
 
+#ifndef PICODATA_BUG_REPORT_INFO
+#define PICODATA_BUG_REPORT_INFO "support@picodata.io"
+#endif
+
 /** Storage for crash_collect function return value. */
 static struct crash_info crash_info;
 
@@ -143,8 +147,7 @@ crash_report_stderr(struct crash_info *cinfo)
 #endif /* HAS_GREG */
 
 	fprintf(stderr, "Current time: %u\n", (unsigned)time(0));
-	fprintf(stderr, "Please file a bug at "
-		"https://github.com/tarantool/tarantool/issues\n");
+	fprintf(stderr, "Please file a bug at " PICODATA_BUG_REPORT_INFO "\n");
 
 #ifdef ENABLE_BACKTRACE
 	fprintf(stderr, "Attempting backtrace... Note: since the server has "
-- 
GitLab