From a3de882a15af0684af047484f386c4eb2aff8399 Mon Sep 17 00:00:00 2001 From: Summer-the-coder Date: Fri, 13 Jun 2025 08:55:30 +0300 Subject: [PATCH 1/2] added another possible cause of "UndefinedBehaviorSanitizer:DEADLYSIGNAL" --- content/training/troubleshooting.mdx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/content/training/troubleshooting.mdx b/content/training/troubleshooting.mdx index 9e156f39..3318e93c 100644 --- a/content/training/troubleshooting.mdx +++ b/content/training/troubleshooting.mdx @@ -202,7 +202,9 @@ UndefinedBehaviorSanitizer can not provide additional info. ==1==ABORTING ``` -On Codewars, this error was usually seen when a solution attempted to dereference a past-the-end iterator, usually returned by `end( )` or by some function which signals some negative outcome by returning `end` iterator (for example, `std::find(myvec.begin(), myvec.end(), someValue)` will return `myvec.end()` if value is not found). +There are some common causes for this problem: +- attempt to dereference a past-the-end iterator, usually returned by `end( )` or by some function which signals some negative outcome by returning `end` iterator (for example, `std::find(myvec.begin(), myvec.end(), someValue)` will return `myvec.end()` if value is not found). +- division by zero ### Exit code 137 From f2749076d7fe06f54b2fe6324640b9ef6f7eb9d6 Mon Sep 17 00:00:00 2001 From: Summer-the-coder Date: Fri, 13 Jun 2025 11:39:17 +0300 Subject: [PATCH 2/2] Update content/training/troubleshooting.mdx Co-authored-by: hobovsky <23709795+hobovsky@users.noreply.github.com> --- content/training/troubleshooting.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/training/troubleshooting.mdx b/content/training/troubleshooting.mdx index 3318e93c..3ec4d330 100644 --- a/content/training/troubleshooting.mdx +++ b/content/training/troubleshooting.mdx @@ -204,7 +204,7 @@ UndefinedBehaviorSanitizer can not provide additional info. There are some common causes for this problem: - attempt to dereference a past-the-end iterator, usually returned by `end( )` or by some function which signals some negative outcome by returning `end` iterator (for example, `std::find(myvec.begin(), myvec.end(), someValue)` will return `myvec.end()` if value is not found). -- division by zero +- Division by zero (including modulo with zero divisor) ### Exit code 137