subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kot...@apache.org
Subject svn commit: r1604131 - /subversion/trunk/subversion/libsvn_subr/win32_crashrpt.c
Date Fri, 20 Jun 2014 10:37:54 GMT
Author: kotkov
Date: Fri Jun 20 10:37:53 2014
New Revision: 1604131

URL: http://svn.apache.org/r1604131
Log:
Get rid of the undefined behavior in the 64-bit Windows crash reporter.
There is a coding oversight that has been there since the r866928.
Prior to this changeset, a register dump could look like this:
[[[
  cs=0033  ss=002b  ds=002b  es=0053  fs=002b  gs=002b  ss=cccccccc
                                                        ^^^ (here is the UB)

  ^^^ (these segment registers actually are incorrectly
       mixed up within the fprintf() call);
]]]

* subversion/libsvn_subr/win32_crashrpt.c
  (write_process_info): Fix the problem by using a correct format string
    and ordering the arguments the same way as in the 32-bit code path.

Modified:
    subversion/trunk/subversion/libsvn_subr/win32_crashrpt.c

Modified: subversion/trunk/subversion/libsvn_subr/win32_crashrpt.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/win32_crashrpt.c?rev=1604131&r1=1604130&r2=1604131&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/win32_crashrpt.c (original)
+++ subversion/trunk/subversion/libsvn_subr/win32_crashrpt.c Fri Jun 20 10:37:53 2014
@@ -252,9 +252,9 @@ write_process_info(EXCEPTION_RECORD *exc
                 context->R12, context->R13, context->R14, context->R15);
 
   fprintf(log_file,
-                "cs=%04x  ss=%04x  ds=%04x  es=%04x  fs=%04x  gs=%04x  ss=%04x\n",
-                context->SegCs, context->SegDs, context->SegEs,
-                context->SegFs, context->SegGs, context->SegSs);
+                "cs=%04x  ss=%04x  ds=%04x  es=%04x  fs=%04x  gs=%04x\n",
+                context->SegCs, context->SegSs, context->SegDs,
+                context->SegEs, context->SegFs, context->SegGs);
 #else
 #error Unknown processortype, please disable SVN_USE_WIN32_CRASHHANDLER
 #endif



Mime
View raw message