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

Use same set of headers in default mode and mutant-tracking mode #343

Merged
merged 8 commits into from
Sep 25, 2024

Conversation

JonathanFoo0523
Copy link
Collaborator

Previously, dredd included different sets of headers for default mode
and mutant-tracking mode. This could alter macro definitions and lead to
the manual insertion of void __dredd_prelude_start(); in one mode but
not the other. To ensure consistency across both modes, Dredd now emits
the union of headers from both modes.

Fixes #342 .

@JonathanFoo0523
Copy link
Collaborator Author

JonathanFoo0523 commented Sep 20, 2024

@afd seems like the window build failed because stdatomic.h is an experimental feature for MSVC:
https://developercommunity.visualstudio.com/t/VS2022-1754:-stdatomich:-Compile-erro/10351339

The workaround is adding /experimental:c11atomics flag.

Could you let me know where to modify the workflow script to add MSVC compiler flag? Is it this line here?

@afd
Copy link
Member

afd commented Sep 22, 2024

From the CI logs I see:

cl.exe '/std:c17 /experimental:c11atomics' -c add.c

It looks like the two flags are being passed as if they were a single flag, due to the use of quotes. Hopefully if the quotes are eliminated this will work.

Copy link
Member

@afd afd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good but some changes suggested.

src/libdredd/src/mutate_ast_consumer.cc Outdated Show resolved Hide resolved
.github/workflows/build.sh Outdated Show resolved Hide resolved
.github/workflows/build.sh Outdated Show resolved Hide resolved
@JonathanFoo0523 JonathanFoo0523 merged commit 39357c7 into main Sep 25, 2024
9 checks passed
@JonathanFoo0523 JonathanFoo0523 deleted the issue-342 branch September 25, 2024 19:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Header consistency in dredd's default and mutant-tracking modes
2 participants