Skip to content

Commit

Permalink
Add bReportBugsForOOMExceptions
Browse files Browse the repository at this point in the history
When set to True, this will cause cBugId to report all OOM related
exceptions as bugs immediately (see
SkyLined/BugId#54).
  • Loading branch information
SkyLined committed Dec 30, 2017
1 parent ebd6b9d commit 121baab
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion ProjectDetails.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
"sUserName": "SkyLined"
},
"sProjectName": "cBugId",
"sVersion": "2017-12-30 00:27"
"sVersion": "2017-12-30 16:55"
}
7 changes: 7 additions & 0 deletions dxConfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,13 @@
# the timeouts to fire closer to the intended time, but slows down debugging.
# Making the value larger can cause timeouts to fire a lot later than requested.
### Exception handling
"bReportBugsForOOMExceptions": True, # Report a bug the moment an exception is thrown that indicates the application
# was not able to allocate memory. Enabling this allows you to detect OOM
# crashes when the application handles this exception itself (and most likely
# terminates itself in response), but it may result in false positives if the
# application would have handled the OOM exception and continue to function
# normally. The best setting therefore depends on how the application handles
# OOM exceptions, so you may have to experiment with this.
"bIgnoreCPPExceptions": False, # Can be used to ignore C++ exceptions completely in applications that use them
# a lot. This can speed up debugging quite a bit, but you risk not detecting
# unhandled C++ exceptions. These will cause the application to terminate if
Expand Down
8 changes: 8 additions & 0 deletions fsExceptionHandlingCdbCommands.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,14 @@ def fsExceptionHandlingCdbCommands():
WRT_ORIGINATE_ERROR_EXCEPTION,
WRT_TRANSFORM_ERROR_EXCEPTION,
]);
daxExceptionHandling[dxConfig["bReportBugsForOOMExceptions"] and "sxe" or "sxd"].extend([
ERROR_NOT_ENOUGH_MEMORY,
ERROR_OUTOFMEMORY,
ERROR_NOT_ENOUGH_SERVER_MEMORY,
ERROR_IPSEC_IKE_OUT_OF_MEMORY,
STATUS_NO_MEMORY,
0xE0000008, # Chrome specific - not sure yet how to add application specific exceptions in a more elegant way.
]);
asExceptionHandlingCommands = ["sxd *;"];
# request second chance debugger break for certain exceptions that indicate the application has a bug.
for sCommand, axExceptions in daxExceptionHandling.items():
Expand Down

0 comments on commit 121baab

Please sign in to comment.