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

BUG: fix darshan-runtime config parsing leading to infinite loops #988

Merged
merged 1 commit into from
Oct 2, 2024

Conversation

shanedsnyder
Copy link
Contributor

Various Darshan config variables take a CSV of regexes as input (e.g. APP_EXCLUDE, NAME_EXCLUDE). Darshan's code for iterating and parsing these regexes can cause an infinite loop if one of the regexes is unable to be compiled. E.g.,

NAME_EXCLUDE    *    POSIX

The 2nd field is the regex CSV (in this case just a single regex), but * is not a valid regex (it is a special character indicating that the preceding character(s) are repeated one or more times, but there are no preceding characters above) and causes an error when compiling the regex. This input causes Darshan to continuously output the following warning:

darshan library warning: unable to compile Darshan config NAME_EXCLUDE regex *

This PR fixes the bug causing the Darshan library to continuously parse the same erroneous token rather than printing a warning once and advancing.

@shanedsnyder shanedsnyder merged commit 13233ad into main Oct 2, 2024
5 checks passed
@shanedsnyder shanedsnyder added this to the 3.4.6 milestone Oct 7, 2024
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.

1 participant