[Bf-blender-cvs] [51c433f1a52] master: Windows: Remove zero terminator from stack trace

Ray Molenkamp noreply at git.blender.org
Mon Jan 25 16:50:42 CET 2021


Commit: 51c433f1a52dfd0a0d51f3d8a2a954352be09b98
Author: Ray Molenkamp
Date:   Mon Jan 25 08:50:37 2021 -0700
Branches: master
https://developer.blender.org/rB51c433f1a52dfd0a0d51f3d8a2a954352be09b98

Windows: Remove zero terminator from stack trace

Important lesson to be learned here, leaving comments
is great and in the moment, they usually make sense.

Many months later they may not quite make as much sense
any more and time will have to be spend to figure out
what was meant, all of this would have been averted with a
better comment.

The zero terminator in this case, I can find no evidence
of it being used or relied on at any point. It does however
break GTests's `EXPECT_EXIT` macro that stops looking in
the output as soon as it sees the zts and doesn't end up
looking at the actual assert text being thrown. Which in
turn makes the`fcurve_active_keyframe`test fail when run
in debug mode on windows.

===================================================================

M	source/blender/blenlib/intern/system_win32.c

===================================================================

diff --git a/source/blender/blenlib/intern/system_win32.c b/source/blender/blenlib/intern/system_win32.c
index be2195d679d..7572936592e 100644
--- a/source/blender/blenlib/intern/system_win32.c
+++ b/source/blender/blenlib/intern/system_win32.c
@@ -386,7 +386,6 @@ void BLI_system_backtrace(FILE *fp)
     bli_windows_system_backtrace_threads(fp);
   }
   bli_windows_system_backtrace_modules(fp);
-  fputc(0, fp); /* Give our selves a nice zero terminator for later on */
 }
 
 void BLI_windows_handle_exception(EXCEPTION_POINTERS *exception)



More information about the Bf-blender-cvs mailing list