Skip to content

Commit

Permalink
PR Feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
waahm7 committed Jul 5, 2023
1 parent 7ed2099 commit 3de69a1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,4 @@ static: certificate has an existing certificate-key pair that was previously imp
```

## Crash Handler
You can enable the crash handler by setting the environment variable `AWS_CRT_ENABLE_CRASH_HANDLER=1`. This will print the callstack to `stderr` in the event of a fatal error.
You can enable the crash handler by setting the environment variable `AWS_CRT_CRASH_HANDLER=1`. This will print the callstack to `stderr` in the event of a fatal error.
3 changes: 2 additions & 1 deletion source/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -804,7 +804,7 @@ static PyMethodDef s_module_methods[] = {

static const char s_module_name[] = "_awscrt";
PyDoc_STRVAR(s_module_doc, "C extension for binding AWS implementations of MQTT, HTTP, and friends");
AWS_STATIC_STRING_FROM_LITERAL(s_crash_handler_env_var, "AWS_CRT_ENABLE_CRASH_HANDLER");
AWS_STATIC_STRING_FROM_LITERAL(s_crash_handler_env_var, "AWS_CRT_CRASH_HANDLER");

/*******************************************************************************
* Module Init
Expand Down Expand Up @@ -838,6 +838,7 @@ PyMODINIT_FUNC PyInit__awscrt(void) {
if (aws_string_eq_c_str(crash_handler_env, "1")) {
s_install_crash_handler();
}
aws_string_destroy(crash_handler_env);

aws_http_library_init(nontracing_allocator);
aws_auth_library_init(nontracing_allocator);
Expand Down
1 change: 1 addition & 0 deletions test/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
# the "noqa" comment prevents the autoformatter from moving this line below other imports
import os
os.environ['AWS_CRT_MEMORY_TRACING'] = '2' # noqa
os.environ['AWS_CRT_CRASH_HANDLER'] = '1' # noqa

from awscrt import NativeResource
from awscrt._test import check_for_leaks
Expand Down

0 comments on commit 3de69a1

Please sign in to comment.