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

Adds clang as second compiler for test cases #27

Merged
merged 10 commits into from
Jul 29, 2019
Merged

Conversation

tbarabosch
Copy link
Contributor

Even though clang is the first example, we could add more compilers in the future (e.g. the official ARM compilers).

Thomas Barabosch added 2 commits July 17, 2019 15:25
…ed clang as first examples. Fixed test cases to work with gcc
runs also unittests), install_cross_compilers installs also clang.
@tbarabosch tbarabosch requested a review from Enkelmann July 18, 2019 12:18
@tbarabosch tbarabosch self-assigned this Jul 18, 2019
res = cwe_checker_testlib.execute_and_check_occurence(self.target, self.target, 'x64', 'gcc', self.string)
self.assertEqual(res, expect_res)

@unittest.skip("FIXME")
Copy link
Contributor

Choose a reason for hiding this comment

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

I should take a look at this.

Copy link
Contributor

Choose a reason for hiding this comment

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

clang seems to optimze away the relevant calls for the check. Is there a "do not optimize anything"-flag for clang that we could use?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

we could build the binaries with -o0

Copy link
Contributor

@Enkelmann Enkelmann Jul 19, 2019

Choose a reason for hiding this comment

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

If it is not enabled by default, we should do that.

Edit: Ahh, cwe 476 needed optimizations to prevent other false positives... Ok, let's wait with fixing this issue until we removed these false positives from the check.

Copy link
Contributor

@Enkelmann Enkelmann 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! I want to test it on my computer before merging, which I will do tomorrow morning.

Copy link
Contributor

@Enkelmann Enkelmann left a comment

Choose a reason for hiding this comment

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

For some reason the x86_gcc test binaries are not built on Ubuntu 18.04. Could you take a look at this?

@tbarabosch
Copy link
Contributor Author

I am going to look into the x86_gcc issue. But I suppose it's a problem with dockcross....

@tbarabosch
Copy link
Contributor Author

I did a clean build of all artificial examples on this branch. I was able to build for all arches including x86. Could you please check your dockcross installation?

@Enkelmann
Copy link
Contributor

OK, then it is probably a problem on my machine. Merging.

@Enkelmann Enkelmann merged commit 5ad922d into master Jul 29, 2019
@Enkelmann Enkelmann deleted the add_compiler_support branch July 29, 2019 14:18
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.

2 participants