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

Create a tool-info module for BtorMC #1045

Merged
merged 10 commits into from
Jun 7, 2024

Conversation

Po-Chun-Chien
Copy link
Member

No description provided.

When passing only `--version` to BtorMC,
the tool does not terminate,
an EOF (ctrl-D) has to be passed to stdin additionally.
benchexec/tools/btormc.py Outdated Show resolved Hide resolved
benchexec/tools/btormc.py Outdated Show resolved Hide resolved
benchexec/tools/template.py Outdated Show resolved Hide resolved
benchexec/tools/btormc.py Outdated Show resolved Hide resolved
PhilippWendler added a commit that referenced this pull request Jun 7, 2024
In the function that most tool-info modules use
for getting the version number from the tool,
we did not specify what stdin of the tool should be.
The unfortunate default for this is the same as stdin
of the calling tool, i.e., BenchExec.
This means that if a tool would read from stdin
while we call it to get its version,
it would either hang due to no input
or even read from what the user attempted to pass to BenchExec.
Both is not good and this happened in #1045.

Now we explicitly specify /dev/null as stdin,
such that when attempting to read the tool just gets EOF.
We also use /dev/null for stdin by default for the actual tool execution
since 564f18f (BenchExec 0.5), so I do not expect any problems.
Tools who do not read from stdin are not affected,
and for tools who do read it is just an improvement
that they get EOF instead of waiting for input.
@PhilippWendler PhilippWendler merged commit 5d7a519 into sosy-lab:main Jun 7, 2024
7 checks passed
Po-Chun-Chien pushed a commit to Po-Chun-Chien/benchexec that referenced this pull request Jun 7, 2024
In the function that most tool-info modules use
for getting the version number from the tool,
we did not specify what stdin of the tool should be.
The unfortunate default for this is the same as stdin
of the calling tool, i.e., BenchExec.
This means that if a tool would read from stdin
while we call it to get its version,
it would either hang due to no input
or even read from what the user attempted to pass to BenchExec.
Both is not good and this happened in sosy-lab#1045.

Now we explicitly specify /dev/null as stdin,
such that when attempting to read the tool just gets EOF.
We also use /dev/null for stdin by default for the actual tool execution
since 564f18f (BenchExec 0.5), so I do not expect any problems.
Tools who do not read from stdin are not affected,
and for tools who do read it is just an improvement
that they get EOF instead of waiting for input.
Po-Chun-Chien added a commit to Po-Chun-Chien/benchexec that referenced this pull request Jun 7, 2024
@Po-Chun-Chien Po-Chun-Chien deleted the btormc-tool-info branch June 10, 2024 19:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

2 participants