Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix directive output truncated writing 4 bytes into a region of size 1. #26

Merged
merged 1 commit into from
Dec 5, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ubench.h
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ UBENCH_EXTERN struct ubench_state_s ubench_state;
static void ubench_##SET##_##NAME(struct ubench_run_state_s *ubs); \
UBENCH_INITIALIZER(ubench_register_##SET##_##NAME) { \
const size_t index = ubench_state.benchmarks_length++; \
const char *name_part = #SET "." #NAME; \
const char name_part[] = #SET "." #NAME; \
const size_t name_size = strlen(name_part) + 1; \
char *name = UBENCH_PTR_CAST(char *, malloc(name_size)); \
ubench_state.benchmarks = UBENCH_PTR_CAST( \
Expand Down Expand Up @@ -438,7 +438,7 @@ UBENCH_EXTERN struct ubench_state_s ubench_state;
} \
UBENCH_INITIALIZER(ubench_register_##FIXTURE##_##NAME) { \
const size_t index = ubench_state.benchmarks_length++; \
const char *name_part = #FIXTURE "." #NAME; \
const char name_part[] = #FIXTURE "." #NAME; \
const size_t name_size = strlen(name_part) + 1; \
char *name = UBENCH_PTR_CAST(char *, malloc(name_size)); \
ubench_state.benchmarks = UBENCH_PTR_CAST( \
Expand Down
Loading