Skip to content

Conversation

@mcbarton
Copy link
Collaborator

@mcbarton mcbarton commented Nov 6, 2025

Description

Please include a summary of changes, motivation and context for this PR.

Fixes # (issue)

Type of change

Please tick all options which are relevant.

  • Bug fix
  • New feature
  • Added/removed dependencies
  • Required documentation updates

@codecov-commenter
Copy link

codecov-commenter commented Nov 6, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.94%. Comparing base (62268e7) to head (569c6c8).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #405   +/-   ##
=======================================
  Coverage   81.94%   81.94%           
=======================================
  Files          21       21           
  Lines         853      853           
  Branches       87       87           
=======================================
  Hits          699      699           
  Misses        154      154           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mcbarton
Copy link
Collaborator Author

mcbarton commented Nov 6, 2025

I am not sure what is going wrong with using Valgrind on Ubuntu arm runners in the ci (see https://github.com/compiler-research/xeus-cpp/actions/runs/19150317221/job/54738556792?pr=405 ) . This Valgrind error doesn't occur when I run same command locally (and how I managed to produce the Valgrind suppression file. I don't know how to interpret the suppression files, so unsure if there is anything in there that we don't want to suppress.

@anutosh491
Copy link
Collaborator

anutosh491 commented Nov 7, 2025

Why is this PR needed in the first place ?

P.S : Asking as someone who is clueless about Valgrind.

@mcbarton mcbarton force-pushed the Add-Valgrind-check-ci branch from 9a66c1c to 4c0ec52 Compare November 10, 2025 14:39
@mcbarton mcbarton changed the title [wip] Run C++ tests in Valgrind ci [ci] Run tests under Valgrind Ubuntu x86 Nov 10, 2025
@mcbarton mcbarton force-pushed the Add-Valgrind-check-ci branch from 4c0ec52 to d47866d Compare November 10, 2025 14:41
@mcbarton
Copy link
Collaborator Author

mcbarton commented Nov 10, 2025

Why is this PR needed in the first place ?

P.S : Asking as someone who is clueless about Valgrind.

The truthfull reason as to why I added this to the ci is to be consistent with all of compiler researches other repos, which run the tests under Valgrind. I cannot list the benefits of Valgrind as I am still in the process of teaching myself how to use it effectively. I for example cannot tell you if I am suppressing anything that we shouldn't. @vgvassilev @Vipul-Cariappa or @aaronj0 though may be able to enlighten you as to why its used in all the other repos, and help you with a review (once they have bandwidth).

I have limited this PR to just running the tests under Valgrind for Ubuntu x86, as running the tests under Valgrind on Ubuntu arm caused an illegal instruction error from Valgrind which doesn't happen locally, so possibly a bug with the runner. I consider this PR now ready for review.

@anutosh491
Copy link
Collaborator

cc @JohanMabille
what's your take on this ?

Asking cause I lack experience with Valgrind :/

@JohanMabille
Copy link
Collaborator

I think Valgrind is a very useful tool for both sanity checks and debugging. I also support the consistency across compiler-research repos.

Regarding the failures, this looks like an unsupported instruction detected by Valgrind. Since the tests run fine, this looks like a Valgrind issue (or the way we use it). I don't see the xeus-cpp-valgrind_arm.supp file used here. IT would be nice to print the value of ${SUPPRESSION_FILE} before invoking Valgrind.

@mcbarton
Copy link
Collaborator Author

mcbarton commented Nov 20, 2025

I think Valgrind is a very useful tool for both sanity checks and debugging. I also support the consistency across compiler-research repos.

Regarding the failures, this looks like an unsupported instruction detected by Valgrind. Since the tests run fine, this looks like a Valgrind issue (or the way we use it). I don't see the xeus-cpp-valgrind_arm.supp file used here. IT would be nice to print the value of ${SUPPRESSION_FILE} before invoking Valgrind.

@johan There was a Valgrind suppression file for Linux arm, but it got removed due the illegal instruction issue in the ci. Here is what is looks like if your interested https://github.com/mcbarton/xeus-cpp/blob/valgrind-check-2/etc/xeus-cpp-valgrind_arm.supp . The way we are using Valgrind is fine, since I was able to produce this file using the command locally. There is some issue with the runner. I will update ci accordingly so that the suppression file used is hardcoded for now to the x86 file, and remove the reference to the arm suppression file until the issue with the arm runner can be determined.

@mcbarton mcbarton force-pushed the Add-Valgrind-check-ci branch from 0dc2d8f to 2b3168a Compare November 20, 2025 20:22
@mcbarton
Copy link
Collaborator Author

I have now updated the ci to only reference an x86 Valgrind suppression file.

@mcbarton mcbarton force-pushed the Add-Valgrind-check-ci branch from f9e1633 to d29425d Compare November 20, 2025 20:35
@mcbarton mcbarton force-pushed the Add-Valgrind-check-ci branch from 61a4b3e to 569c6c8 Compare November 20, 2025 21:38
@mcbarton mcbarton merged commit 253a827 into compiler-research:main Nov 21, 2025
16 checks passed
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