Bug 626994. Try to detect and report Cisco VPN usage. r=ehsan,a=b
authorJeff Muizelaar <jmuizelaar@mozilla.com>
Tue, 01 Feb 2011 11:30:25 -0500
changeset 61737 0a74956ae143984f9f6006067139c4954e76472f
parent 61736 c0c64f24c8a701fc8ebff7bcf8c62311b0150263
child 61738 5735139db6db323bd20493bbeeaf40c83eeb5e76
push id1
push userroot
push dateTue, 10 Dec 2013 15:46:25 +0000
reviewersehsan, b
bugs626994
milestone2.0b11pre
Bug 626994. Try to detect and report Cisco VPN usage. r=ehsan,a=b This should help us filter out crashes that caused by the Cisco VPN software
widget/src/windows/GfxInfo.cpp
--- a/widget/src/windows/GfxInfo.cpp
+++ b/widget/src/windows/GfxInfo.cpp
@@ -460,20 +460,39 @@ GfxInfo::GetAdapterVendorID(PRUint32 *aA
 /* readonly attribute unsigned long adapterDeviceID; */
 NS_IMETHODIMP
 GfxInfo::GetAdapterDeviceID(PRUint32 *aAdapterDeviceID)
 {
   *aAdapterDeviceID = mAdapterDeviceID;
   return NS_OK;
 }
 
+#if defined(MOZ_CRASHREPORTER) && defined(MOZ_ENABLE_LIBXUL)
+/* Cisco's VPN software can cause corruption of the floating point state.
+ * Make a note of this in our crash reports so that some weird crashes
+ * make more sense */
+static void
+CheckForCiscoVPN() {
+  LONG result;
+  HKEY key;
+  /* This will give false positives, but hopefully no false negatives */
+  result = RegOpenKeyExW(HKEY_LOCAL_MACHINE, L"Software\\Cisco Systems\\VPN Client", 0, KEY_QUERY_VALUE, &key);
+  if (result == ERROR_SUCCESS) {
+    RegCloseKey(key);
+    CrashReporter::AppendAppNotesToCrashReport(NS_LITERAL_CSTRING("Cisco VPN\n"));
+  }
+}
+#endif
+
 void
 GfxInfo::AddCrashReportAnnotations()
 {
 #if defined(MOZ_CRASHREPORTER) && defined(MOZ_ENABLE_LIBXUL)
+  CheckForCiscoVPN();
+
   nsCAutoString deviceIDString, vendorIDString;
   PRUint32 deviceID, vendorID;
   nsAutoString adapterDriverVersionString;
 
   GetAdapterDeviceID(&deviceID);
   GetAdapterVendorID(&vendorID);
   GetAdapterDriverVersion(adapterDriverVersionString);