From aa446b0540dc7858fb54f7d464a810823507d7a8 Mon Sep 17 00:00:00 2001 From: Bruce Mitchener Date: Sun, 18 Feb 2024 13:10:21 +0700 Subject: [PATCH] Fix typos. (#90) --- CHANGELOG.md | 2 +- README.md | 2 +- SECURITY.md | 2 +- ci/util.py | 2 +- docs/signal-safe-tracing.md | 4 ++-- src/cpptrace.cpp | 4 ++-- test/signal_demo.cpp | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6d63f14..1165ebd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,7 +17,7 @@ What's new: Most notable improvements: - Updated cpptrace exception objects to generate traces at the callsite for improved consistency with trace output. As - part fo this cpptrace exception objects have had their constructors updated. + part of this cpptrace exception objects have had their constructors updated. - Improved dwarf back-end robustness - Fallback to the compilation-unit cache or walking compilation-units if aranges lookup fails - Eliminated reliance on a CMake-generated export header diff --git a/README.md b/README.md index c5188a3..6babc29 100644 --- a/README.md +++ b/README.md @@ -250,7 +250,7 @@ namespace cpptrace { `cpptrace::demangle` provides a helper function for name demangling, since it has to implement that helper internally anyways. -`cpptrace::isatty` and the fileno definitions are useful for deciding whether to use color when printing stack taces. +`cpptrace::isatty` and the fileno definitions are useful for deciding whether to use color when printing stack traces. `cpptrace::register_terminate_handler()` is a helper function to set a custom `std::terminate` handler that prints a stack trace from a cpptrace exception (more info below) and otherwise behaves like the normal terminate handler. diff --git a/SECURITY.md b/SECURITY.md index c33bbd5..7f20442 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -6,7 +6,7 @@ We take security seriously and I'm grateful for reports of security vulnerabilit If the vulnerability can be reported without revealing exploitable specifics, please open an issue. -If the vulnerability can't be reported publically without leaving an obvious exploit in the public eye please email me +If the vulnerability can't be reported publicly without leaving an obvious exploit in the public eye please email me at jeremy@rifkin.dev or reach out to me on [discord](https://discord.gg/7kv5AuCndG). I will do my best to get back to you within a day. diff --git a/ci/util.py b/ci/util.py index 45fdd3c..4933e6e 100644 --- a/ci/util.py +++ b/ci/util.py @@ -60,7 +60,7 @@ def run_matrix(matrix, exclude, fn): # results[config_tuple] = matrix_config["compiler"] != "g++-10" #else: # results[config_tuple] = not (matrix_config["compiler"] == "clang++-14" and matrix_config["symbols"] == "CPPTRACE_GET_SYMBOLS_WITH_ADDR2LINE") - # I had an idea for printing 2d slices of the n-dimentional matrix, but it didn't pan out as much as I'd hoped + # I had an idea for printing 2d slices of the n-dimensional matrix, but it didn't pan out as much as I'd hoped dimensions = len(values) # # Output diagnostic tables # print("Results:", results) diff --git a/docs/signal-safe-tracing.md b/docs/signal-safe-tracing.md index 362166c..3dbebdb 100644 --- a/docs/signal-safe-tracing.md +++ b/docs/signal-safe-tracing.md @@ -138,7 +138,7 @@ void do_signal_safe_trace(cpptrace::frame_ptr* buffer, std::size_t size) { pipe_t input_pipe; pipe(input_pipe.data); const pid_t pid = fork(); - if(pid == -1) { return; /* Some error ocurred */ } + if(pid == -1) { return; /* Some error occurred */ } if(pid == 0) { // child dup2(input_pipe.read_end, STDIN_FILENO); close(input_pipe.read_end); @@ -160,7 +160,7 @@ void do_signal_safe_trace(cpptrace::frame_ptr* buffer, std::size_t size) { void handler(int signo, siginfo_t* info, void* context) { // Print basic message - const char* message = "SIGSEGV ocurred:\n"; + const char* message = "SIGSEGV occurred:\n"; write(STDERR_FILENO, message, strlen(message)); // Generate trace constexpr std::size_t N = 100; diff --git a/src/cpptrace.cpp b/src/cpptrace.cpp index d69a2c2..1af76e8 100644 --- a/src/cpptrace.cpp +++ b/src/cpptrace.cpp @@ -455,7 +455,7 @@ namespace cpptrace { // TODO: Append to message somehow std::fprintf( stderr, - "Cpptrace: Exception ocurred while resolving trace in cpptrace::exception object:\n%s\n", + "Cpptrace: Exception occurred while resolving trace in cpptrace::exception object:\n%s\n", e.what() ); } @@ -520,7 +520,7 @@ namespace cpptrace { // TODO: Append to message somehow? std::fprintf( stderr, - "Exception ocurred while resolving trace in cpptrace::exception object:\n%s\n", + "Exception occurred while resolving trace in cpptrace::exception object:\n%s\n", e.what() ); } diff --git a/test/signal_demo.cpp b/test/signal_demo.cpp index dc7decc..1d7b9a4 100644 --- a/test/signal_demo.cpp +++ b/test/signal_demo.cpp @@ -35,7 +35,7 @@ struct pipe_t { static_assert(sizeof(pipe_t) == 2 * sizeof(int), "Unexpected struct packing"); void handler(int signo, siginfo_t* info, void* context) { - const char* message = "SIGSEGV ocurred:\n"; + const char* message = "SIGSEGV occurred:\n"; write(STDERR_FILENO, message, strlen(message)); cpptrace::frame_ptr buffer[100]; std::size_t count = cpptrace::safe_generate_raw_trace(buffer, 100);