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

Compile using ASAN on the github CI #3142

Merged
merged 1 commit into from
Sep 10, 2024
Merged

Conversation

powerboat9
Copy link
Contributor

This adds a job for running GCC with ASAN to the github CI

Copy link
Member

@CohenArthur CohenArthur left a comment

Choose a reason for hiding this comment

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

great stuff! thanks a lot!

@powerboat9
Copy link
Contributor Author

Not working yet, having trouble with linker during link tests

@powerboat9
Copy link
Contributor Author

Alright, looks like things are working now

@powerboat9 powerboat9 force-pushed the ci-asan branch 3 times, most recently from 1857bd6 to 1a9322d Compare August 30, 2024 15:04
@powerboat9
Copy link
Contributor Author

It looks like the execute tests are failing because runtime libraries compiled with ASAN require that the programs using them are compiled with ASAN.


CONFIGURE=$(dirname $(dirname $0))/configure

$CONFIGURE CFLAGS="$COMMON -B$GCC_LIBS" \
Copy link
Contributor

Choose a reason for hiding this comment

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

Consider using --with-build-config="bootstrap-asan" (or whatever it is) instead, but not sure how to handle tests (some DejaGnu hackery may be needed there).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

bootstrap-asan doesn't work with --disable-bootstrap, as far as I can tell

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, you're right, but I see you've figured it out ;)

@powerboat9
Copy link
Contributor Author

I was trying to avoid creating a custom build config file, but in hindsight that's probably the best way to go

@powerboat9
Copy link
Contributor Author

Should be ready for review again

Copy link
Contributor

@thesamesam thesamesam left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks!

@CohenArthur
Copy link
Member

Ah, I think the test failures might be due to the execute testsuite running but not linking with ASAN? this is something that happens to me when I do local ASAN builds. If that is the case, then a solution would be to either run only the compile.exp testsuite with RUNTESTFLAGS or figure out how to run the execute.exp testsuite in compile-only mode, without linking/running the final binary. but I don't know if dejagnu supports this

@powerboat9
Copy link
Contributor Author

I managed to get the execute tests working, and it seems like the remaining test failures are down to bugs in GCCRS

ChangeLog:

	* .github/workflows/ccpp.yml: Add job for running tests with
	ASAN.
	* .github/no-bootstrap-asan.mk: New file.

Signed-off-by: Owen Avery <powerboat9.gamer@gmail.com>
@powerboat9
Copy link
Contributor Author

The ASAN check should pass now

@P-E-P P-E-P added this pull request to the merge queue Sep 10, 2024
Merged via the queue into Rust-GCC:master with commit 7e0feec Sep 10, 2024
12 checks passed
@powerboat9 powerboat9 deleted the ci-asan branch September 30, 2024 19:20
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.

4 participants