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

Header consistency in dredd's default and mutant-tracking modes #342

Closed
JonathanFoo0523 opened this issue Sep 20, 2024 · 2 comments · Fixed by #343
Closed

Header consistency in dredd's default and mutant-tracking modes #342

JonathanFoo0523 opened this issue Sep 20, 2024 · 2 comments · Fixed by #343
Assignees

Comments

@JonathanFoo0523
Copy link
Collaborator

Dredd uses different sets of headers for default mode and mutant-tracking mode. Since Dredd's headers are inserted at the beginning of the source file, they can "hide" the original program's headers and alter the definition of certain macros as described here. As a result, the macro definitions may differ between default mode and mutant-tracking mode. Additionally, there might be cases where void __dredd_prelude_start(); is required in one mode but not in the other.

To ensure consistency, Dredd should emit the union of #include headers from both modes.

@afd
Copy link
Member

afd commented Sep 22, 2024

For the issue under Windows - if the experimental C11 atomics flag won't work it would be reasonable to guard the troublesome include lines with

#ifndef _MSC_VER
#include ...
#endif

This would skip it under Windows. Since mutant tracking presumably doesn't work under Windows at present, this would not make things any worse.

@afd
Copy link
Member

afd commented Sep 22, 2024

But actually, see #343 (comment)

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 a pull request may close this issue.

2 participants