Fix typos. (#90)

This commit is contained in:
Bruce Mitchener 2024-02-18 13:10:21 +07:00 committed by GitHub
parent c3b38381ab
commit aa446b0540
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 9 additions and 9 deletions

View File

@ -17,7 +17,7 @@ What's new:
Most notable improvements: Most notable improvements:
- Updated cpptrace exception objects to generate traces at the callsite for improved consistency with trace output. As - 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 - Improved dwarf back-end robustness
- Fallback to the compilation-unit cache or walking compilation-units if aranges lookup fails - Fallback to the compilation-unit cache or walking compilation-units if aranges lookup fails
- Eliminated reliance on a CMake-generated export header - Eliminated reliance on a CMake-generated export header

View File

@ -250,7 +250,7 @@ namespace cpptrace {
`cpptrace::demangle` provides a helper function for name demangling, since it has to implement that helper internally `cpptrace::demangle` provides a helper function for name demangling, since it has to implement that helper internally
anyways. 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 `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. stack trace from a cpptrace exception (more info below) and otherwise behaves like the normal terminate handler.

View File

@ -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 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). 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. I will do my best to get back to you within a day.

View File

@ -60,7 +60,7 @@ def run_matrix(matrix, exclude, fn):
# results[config_tuple] = matrix_config["compiler"] != "g++-10" # results[config_tuple] = matrix_config["compiler"] != "g++-10"
#else: #else:
# results[config_tuple] = not (matrix_config["compiler"] == "clang++-14" and matrix_config["symbols"] == "CPPTRACE_GET_SYMBOLS_WITH_ADDR2LINE") # 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) dimensions = len(values)
# # Output diagnostic tables # # Output diagnostic tables
# print("Results:", results) # print("Results:", results)

View File

@ -138,7 +138,7 @@ void do_signal_safe_trace(cpptrace::frame_ptr* buffer, std::size_t size) {
pipe_t input_pipe; pipe_t input_pipe;
pipe(input_pipe.data); pipe(input_pipe.data);
const pid_t pid = fork(); const pid_t pid = fork();
if(pid == -1) { return; /* Some error ocurred */ } if(pid == -1) { return; /* Some error occurred */ }
if(pid == 0) { // child if(pid == 0) { // child
dup2(input_pipe.read_end, STDIN_FILENO); dup2(input_pipe.read_end, STDIN_FILENO);
close(input_pipe.read_end); 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) { void handler(int signo, siginfo_t* info, void* context) {
// Print basic message // Print basic message
const char* message = "SIGSEGV ocurred:\n"; const char* message = "SIGSEGV occurred:\n";
write(STDERR_FILENO, message, strlen(message)); write(STDERR_FILENO, message, strlen(message));
// Generate trace // Generate trace
constexpr std::size_t N = 100; constexpr std::size_t N = 100;

View File

@ -455,7 +455,7 @@ namespace cpptrace {
// TODO: Append to message somehow // TODO: Append to message somehow
std::fprintf( std::fprintf(
stderr, 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() e.what()
); );
} }
@ -520,7 +520,7 @@ namespace cpptrace {
// TODO: Append to message somehow? // TODO: Append to message somehow?
std::fprintf( std::fprintf(
stderr, 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() e.what()
); );
} }

View File

@ -35,7 +35,7 @@ struct pipe_t {
static_assert(sizeof(pipe_t) == 2 * sizeof(int), "Unexpected struct packing"); static_assert(sizeof(pipe_t) == 2 * sizeof(int), "Unexpected struct packing");
void handler(int signo, siginfo_t* info, void* context) { 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)); write(STDERR_FILENO, message, strlen(message));
cpptrace::frame_ptr buffer[100]; cpptrace::frame_ptr buffer[100];
std::size_t count = cpptrace::safe_generate_raw_trace(buffer, 100); std::size_t count = cpptrace::safe_generate_raw_trace(buffer, 100);