azurelinux icon indicating copy to clipboard operation
azurelinux copied to clipboard

valgrind Disable ld-linux strlen checks

Open AZaugg opened this issue 1 year ago • 1 comments

Merge Checklist

All boxes should be checked before merging the PR (just tick any boxes which don't apply to this PR)

  • [X ] The toolchain has been rebuilt successfully (or no changes were made to it)
  • [X] The toolchain/worker package manifests are up-to-date
  • [X] Any updated packages successfully build (or no packages were changed)
  • [X] Packages depending on static components modified in this PR (Golang, *-static subpackages, etc.) have had their Release tag incremented.
  • [X] Package tests (%check section) have been verified with RUN_CHECK=y for existing SPEC files, or added to new SPEC files
  • [X] All package sources are available
  • [X] cgmanifest files are up-to-date and sorted (./cgmanifest.json, ./toolkit/scripts/toolchain/cgmanifest.json, .github/workflows/cgmanifest.json)
  • [X] LICENSE-MAP files are up-to-date (./SPECS/LICENSES-AND-NOTICES/data/licenses.json, ./SPECS/LICENSES-AND-NOTICES/LICENSES-MAP.md, ./SPECS/LICENSES-AND-NOTICES/LICENSE-EXCEPTIONS.PHOTON)
  • [X] All source files have up-to-date hashes in the *.signatures.json files
  • [X] sudo make go-tidy-all and sudo make go-test-coverage pass
  • [X] Documentation has been updated to match any changes to the build system
  • [X] Ready to merge

Summary

What does the PR accomplish, why was it needed? the valgrind binary does not work on Mariner, disable strleng checks to get it to work

Change Log
  • Added a patch to remove strlng checks on valgrind start
Does this affect the toolchain?

NO

Associated issues
  • #xxxx
Links to CVEs
  • https://nvd.nist.gov/vuln/detail/CVE-YYYY-XXXX
Test Methodology
  • Built package
INFO[0000][scheduler] Building 13 nodes with 16 workers
INFO[0000][scheduler] Building: valgrind-3.22.0-3.cm2.src.rpm
INFO[0157][scheduler] Built: valgrind-3.22.0-3.cm2.src.rpm -> [/home/azaugg/CBL-Mariner/out/RPMS/x86_64/valgrind-3.22.0-3.cm2.x86_64.rpm /home/azaugg/CBL-Mariner/out/RPMS/x86_64/valgrind-debuginfo-3.22.0-3.cm2.x86_64.rpm]
INFO[0157][scheduler] 0 currently active build(s): [].
INFO[0157][scheduler] All packages built
INFO[0158][scheduler] ---------------------------
INFO[0158][scheduler] --------- Summary ---------
INFO[0158][scheduler] ---------------------------
INFO[0158][scheduler] Number of prebuilt SRPMs:           0
INFO[0158][scheduler] Number of prebuilt delta SRPMs:     0
INFO[0158][scheduler] Number of skipped SRPMs tests:      0
INFO[0158][scheduler] Number of built SRPMs:              1
INFO[0158][scheduler] Number of passed SRPMs tests:       0
INFO[0158][scheduler] Number of unresolved dependencies:  0
INFO[0158][scheduler] Number of blocked SRPMs:            0
INFO[0158][scheduler] Number of blocked SRPMs tests:      0
INFO[0158][scheduler] Number of failed SRPMs:             0
INFO[0158][scheduler] Number of failed SRPMs tests:       0
INFO[0158][scheduler] Number of toolchain RPM conflicts:  0
INFO[0158][scheduler] Number of toolchain SRPM conflicts: 0
INFO[0158][scheduler] Built SRPMs:
INFO[0158][scheduler] --> valgrind-3.22.0-3.cm2.src.rpm
INFO[0158][scheduler] ---------------------------
INFO[0158][scheduler] --------- Summary ---------
INFO[0158][scheduler] ---------------------------
INFO[0158][scheduler] Number of prebuilt SRPMs:           0
INFO[0158][scheduler] Number of prebuilt delta SRPMs:     0
INFO[0158][scheduler] Number of skipped SRPMs tests:      0
INFO[0158][scheduler] Number of built SRPMs:              1
INFO[0158][scheduler] Number of passed SRPMs tests:       0
INFO[0158][scheduler] Number of unresolved dependencies:  0
INFO[0158][scheduler] Number of blocked SRPMs:            0
INFO[0158][scheduler] Number of blocked SRPMs tests:      0
INFO[0158][scheduler] Number of failed SRPMs:             0
INFO[0158][scheduler] Number of failed SRPMs tests:       0
INFO[0158][scheduler] Number of toolchain RPM conflicts:  0
INFO[0158][scheduler] Number of toolchain SRPM conflicts: 0
INFO[0158][scheduler] Writing DOT graph to /home/azaugg/CBL-Mariner/build/pkg_artifacts/built_graph.dot
INFO[0158][scheduler] Waiting for outstanding processes to be created
Finished updating /home/azaugg/CBL-Mariner/out/RPMS
  • Ran new binary
azaugg@azaugg-ld1 [ ~/CBL-Mariner/toolkit ] [ main ] $ valgrind ls
==773866== Memcheck, a memory error detector
==773866== Copyright (C) 2002-2022, and GNU GPL'd, by Julian Seward et al.
==773866== Using Valgrind-3.22.0 and LibVEX; rerun with -h for copyright info
==773866== Command: ls
==773866==
Makefile  README.md  docs  imageconfigs  out  resources  scripts  tools
==773866==
==773866== HEAP SUMMARY:
==773866==     in use at exit: 21,969 bytes in 15 blocks
==773866==   total heap usage: 24 allocs, 9 frees, 57,503 bytes allocated
==773866==
==773866== LEAK SUMMARY:
==773866==    definitely lost: 0 bytes in 0 blocks
==773866==    indirectly lost: 0 bytes in 0 blocks
==773866==      possibly lost: 0 bytes in 0 blocks
==773866==    still reachable: 21,969 bytes in 15 blocks
==773866==         suppressed: 0 bytes in 0 blocks
==773866== Rerun with --leak-check=full to see details of leaked memory
==773866==
==773866== For lists of detected and suppressed errors, rerun with: -s
==773866== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)

AZaugg avatar Mar 07 '24 21:03 AZaugg

For more context: right now valgrind in azure linux is broken entirely as it can't be installed since it has a requirement on glibc-debuginfo which we don't produce. We validated valgrind works with this PR

adithyaj avatar Apr 24 '24 22:04 adithyaj