Skip to content

goto-cc with command line option file #6592

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

Closed
naiyujiang opened this issue Jan 18, 2022 · 1 comment · Fixed by #6595
Closed

goto-cc with command line option file #6592

naiyujiang opened this issue Jan 18, 2022 · 1 comment · Fixed by #6595
Assignees

Comments

@naiyujiang
Copy link

naiyujiang commented Jan 18, 2022

CBMC version: 5.43.0 (cbmc-5.43.0)
Operating system: Linux
Exact command line resulting in the issue: goto-cc @param
What behaviour did you expect: goto-cc @param should produce .gb file
What happened instead: goto-cc @param gives Error opening file '' error

Hi team,

I found that goto-cc is not able to parse command line option file correctly if all options/tokens are on different lines.

For example, if I have a file named as param like this:

-o
file.gb
test.c

Running gcc @param works fine, but goto-cc @param will give Error opening file '' error.

However, if I modify the param file to put all options/flags on the same line:

-o file.gb test.c

or, only put -o and file.gb on the same line:

-o file.gb
test.c

In both cases, goto-cc @param works fine. This seems as a bug if goto-cc is being used as a drop-in replacement of gcc in the build process. I wonder if this is a known issue or work-as-expected?

Thanks!

@tautschnig tautschnig added the bug label Jan 19, 2022
@tautschnig tautschnig self-assigned this Jan 19, 2022
tautschnig added a commit to tautschnig/cbmc that referenced this issue Jan 19, 2022
GCC's doc says that options are separated by whitespace, with no
particular significance of newlines. Therefore, process the entire file
at once rather than line-by-line.

Fixes: diffblue#6592
@tautschnig
Copy link
Collaborator

Thank you for your detailed report and the extra debugging already done! This issue will be fixed once #6595 has been merged.

vmihalko pushed a commit to vmihalko/cbmc that referenced this issue Jan 24, 2022
GCC's doc says that options are separated by whitespace, with no
particular significance of newlines. Therefore, process the entire file
at once rather than line-by-line.

Fixes: diffblue#6592
vmihalko pushed a commit to vmihalko/cbmc that referenced this issue Jan 24, 2022
GCC's doc says that options are separated by whitespace, with no
particular significance of newlines. Therefore, process the entire file
at once rather than line-by-line.

Fixes: diffblue#6592
vmihalko pushed a commit to vmihalko/cbmc that referenced this issue Jan 24, 2022
GCC's doc says that options are separated by whitespace, with no
particular significance of newlines. Therefore, process the entire file
at once rather than line-by-line.

Fixes: diffblue#6592
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants