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

tests: Add AddressSanitizer (ASan) Travis build #14794

Merged
merged 3 commits into from Nov 27, 2018

Conversation

@practicalswift
Copy link
Contributor

@practicalswift practicalswift commented Nov 23, 2018

Add ASan Travis build.

.travis.yml Outdated Show resolved Hide resolved
Loading
@fanquake fanquake added the Tests label Nov 23, 2018
@sipa
Copy link
Member

@sipa sipa commented Nov 24, 2018

Any reason to not enable ASan and UBSan in the same test?

Loading

@practicalswift practicalswift force-pushed the asan-in-travis branch 3 times, most recently from 7fdb0a7 to 7e5e3fa Nov 25, 2018
test/functional/p2p_invalid_messages.py Outdated Show resolved Hide resolved
Loading
.travis/test_04_install.sh Outdated Show resolved Hide resolved
Loading
@practicalswift practicalswift force-pushed the asan-in-travis branch 7 times, most recently from 64b8928 to 0a88263 Nov 26, 2018
@practicalswift practicalswift changed the title [wip] Add ASan Travis build Add ASan Travis build Nov 26, 2018
@practicalswift
Copy link
Contributor Author

@practicalswift practicalswift commented Nov 26, 2018

@sipa I was afraid the combined runtime would be too long, but it appears to work. The two Travis jobs have now been merged. Please review.

@MarcoFalke Now running also with LSan (LeakSanitizer). Please review :-)

Loading

@MarcoFalke
Copy link
Member

@MarcoFalke MarcoFalke commented Nov 26, 2018

Could squash everything except the changes in test/functional?

Loading

@practicalswift practicalswift changed the title Add ASan Travis build Add AddressSanitizer (ASan) Travis build Nov 26, 2018
@practicalswift
Copy link
Contributor Author

@practicalswift practicalswift commented Nov 26, 2018

@MarcoFalke Done! Please re-review :-)

Loading

test/sanitizer_suppressions/lsan Show resolved Hide resolved
Loading
@MarcoFalke MarcoFalke changed the title Add AddressSanitizer (ASan) Travis build tests: Add AddressSanitizer (ASan) Travis build Nov 26, 2018
@practicalswift
Copy link
Contributor Author

@practicalswift practicalswift commented Nov 26, 2018

@MarcoFalke Added comments as suggested. Please re-review :-)

Loading

test/sanitizer_suppressions/lsan Outdated Show resolved Hide resolved
Loading
@practicalswift practicalswift force-pushed the asan-in-travis branch 2 times, most recently from 78a62b6 to 65b019a Nov 26, 2018
@MarcoFalke MarcoFalke merged commit 6541d59 into bitcoin:master Nov 27, 2018
2 checks passed
Loading
MarcoFalke added a commit that referenced this issue Nov 27, 2018
6541d59 Add LSan suppression warnings (practicalswift)
ff7212e Add ASan Travis build (practicalswift)
ebd3bf2 Make test p2p_invalid_messages.py pass: Allow for expected Travis ASAN memory increase (practicalswift)

Pull request description:

  Add ASan Travis build.

Tree-SHA512: b9712aaf0c9112b637b6ef0c5d93961863dcbecaf31d9561eb09258a61540fb31d2c8ecae86518a82763279e4aa6cac266cd352c2b2507df0335c0199f8b3d78
deadalnix pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this issue May 21, 2020
Summary:
fac942ca57dce6cfa5655a3ac8664d6a051bc01f test: Remove fragile assert_memory_usage_stable (MarcoFalke)

Pull request description:

  This test fails on arm64 and a fuzz tests seems inappropriate for the functional test suite anyway, so remove it.

  Example failures:

  * https://travis-ci.org/bitcoin/bitcoin/jobs/611497963#L14517
  * https://travis-ci.org/MarcoFalke/bitcoin-core/jobs/611029104#L3876

ACKs for top commit:
  jamesob:
    ACK bitcoin/bitcoin@fac942c

Tree-SHA512: 3577e7ce5891d221cb798454589ba796ed0c06621a26351bb919c23bc6bb46aafcd0b11cb02bbfde64b74d67cb2950da44959a7ecdc436491a34e8b045c1ccf4

Backport of Core [[bitcoin/bitcoin#17469 | PR17469]]

I've skipped backporting Core [[bitcoin/bitcoin#14794 | PR14794]] which attempts to fix the issue using a not-so-robust approach of
looking at env variables to determine if the memory usage threshold should be modified.

This fixes sanitizer failures on CI by removing the problem entirely.

Test Plan:
`ninja check-functional`
and run ASAN on CI

Reviewers: #bitcoin_abc, nakihito

Reviewed By: nakihito

Subscribers: nakihito

Differential Revision: https://reviews.bitcoinabc.org/D6202
MarcoFalke added a commit that referenced this issue Jul 2, 2020
…se of uninitialized memory

870f0cd build: Add MemorySanitizer (MSan) in Travis to detect use of uninitialized memory (practicalswift)

Pull request description:

  Add MemorySanitizer (MSan) in Travis to detect use of uninitialized memory.

  First UBSan, then ASan followed by TSan... and now: yes, the wait is over -- **MSan is finally here!** :)

  Some historical context:
  * 2017: Continuous compilation with Clang Thread Safety analysis enabled (#10866, #10923)
  * 2018: Continuous testing with trapping on signed integer overflows (`-ftrapv`) (#12686)
  * 2018: Continuous testing of use of locale dependent functions (#13041)
  * 2018: Continuous testing of format strings (#13705)
  * 2018: Continuous compilation with MSVC `TreatWarningAsError` (#14151)
  * 2018: Continuous testing under UndefinedBehaviorSanitizer – UBSan (#14252, #14673, #17006)
  * 2018: Continuous testing under AddressSanitizer – ASan (#14794, #17205, #17674)
  * 2018: Continuous testing under ThreadSanitizer – TSan (#14829)
  * 2019: Continuous testing in an unsigned char environment (`-funsigned-char`) (#15134)
  * 2019: Continuous compile-time testing of assumptions we're making (#15391)
  * 2019: Continuous testing of fuzz test cases under Valgrind (#17633, #18159, #18166)
  * 2020: Finally... MemorySanitizer – MSAN! :)

  What is the next step? What tools should we add to CI to keep bugs from entering `master`? :)

ACKs for top commit:
  MarcoFalke:
    ACK 870f0cd

Tree-SHA512: 38327c8b75679d97d469fe42e704cacd1217447a5a603701dd8a58ee50b3be2c10248f8d68a479ed081c0c4b254589d3081c9183f991640b06ef689061f75578
ftrader added a commit to bitcoin-cash-node/bitcoin-cash-node that referenced this issue Aug 17, 2020
Summary:
fac942ca57dce6cfa5655a3ac8664d6a051bc01f test: Remove fragile assert_memory_usage_stable (MarcoFalke)

Pull request description:

  This test fails on arm64 and a fuzz tests seems inappropriate for the functional test suite anyway, so remove it.

  Example failures:

  * https://travis-ci.org/bitcoin/bitcoin/jobs/611497963#L14517
  * https://travis-ci.org/MarcoFalke/bitcoin-core/jobs/611029104#L3876

ACKs for top commit:
  jamesob:
    ACK bitcoin/bitcoin@fac942c

Tree-SHA512: 3577e7ce5891d221cb798454589ba796ed0c06621a26351bb919c23bc6bb46aafcd0b11cb02bbfde64b74d67cb2950da44959a7ecdc436491a34e8b045c1ccf4

Backport of Core [[bitcoin/bitcoin#17469 | PR17469]]

I've skipped backporting Core [[bitcoin/bitcoin#14794 | PR14794]] which attempts to fix the issue using a not-so-robust approach of
looking at env variables to determine if the memory usage threshold should be modified.

This fixes sanitizer failures on CI by removing the problem entirely.

Test Plan:
`ninja check-functional`
and run ASAN on CI

Reviewers: #bitcoin_abc, nakihito

Reviewed By: nakihito

Subscribers: nakihito

Differential Revision: https://reviews.bitcoinabc.org/D6202
@practicalswift practicalswift deleted the asan-in-travis branch Apr 10, 2021
kittywhiskers added a commit to kittywhiskers/dash that referenced this issue Aug 5, 2021
kittywhiskers added a commit to kittywhiskers/dash that referenced this issue Aug 5, 2021
kittywhiskers added a commit to kittywhiskers/dash that referenced this issue Aug 12, 2021
kittywhiskers added a commit to kittywhiskers/dash that referenced this issue Aug 22, 2021
kittywhiskers added a commit to kittywhiskers/dash that referenced this issue Aug 30, 2021
vijaydasmp added a commit to vijaydasmp/dash that referenced this issue Sep 24, 2021
6541d59 Add LSan suppression warnings (practicalswift)
ff7212e Add ASan Travis build (practicalswift)
ebd3bf2 Make test p2p_invalid_messages.py pass: Allow for expected Travis ASAN memory increase (practicalswift)

Pull request description:

  Add ASan Travis build.

Tree-SHA512: b9712aaf0c9112b637b6ef0c5d93961863dcbecaf31d9561eb09258a61540fb31d2c8ecae86518a82763279e4aa6cac266cd352c2b2507df0335c0199f8b3d78
vijaydasmp added a commit to vijaydasmp/dash that referenced this issue Sep 25, 2021
6541d59 Add LSan suppression warnings (practicalswift)
ff7212e Add ASan Travis build (practicalswift)
ebd3bf2 Make test p2p_invalid_messages.py pass: Allow for expected Travis ASAN memory increase (practicalswift)

Pull request description:

  Add ASan Travis build.

Tree-SHA512: b9712aaf0c9112b637b6ef0c5d93961863dcbecaf31d9561eb09258a61540fb31d2c8ecae86518a82763279e4aa6cac266cd352c2b2507df0335c0199f8b3d78
vijaydasmp added a commit to vijaydasmp/dash that referenced this issue Sep 25, 2021
6541d59 Add LSan suppression warnings (practicalswift)
ff7212e Add ASan Travis build (practicalswift)
ebd3bf2 Make test p2p_invalid_messages.py pass: Allow for expected Travis ASAN memory increase (practicalswift)

Pull request description:

  Add ASan Travis build.

Tree-SHA512: b9712aaf0c9112b637b6ef0c5d93961863dcbecaf31d9561eb09258a61540fb31d2c8ecae86518a82763279e4aa6cac266cd352c2b2507df0335c0199f8b3d78
vijaydasmp added a commit to vijaydasmp/dash that referenced this issue Sep 27, 2021
6541d59 Add LSan suppression warnings (practicalswift)
ff7212e Add ASan Travis build (practicalswift)
ebd3bf2 Make test p2p_invalid_messages.py pass: Allow for expected Travis ASAN memory increase (practicalswift)

Pull request description:

  Add ASan Travis build.

Tree-SHA512: b9712aaf0c9112b637b6ef0c5d93961863dcbecaf31d9561eb09258a61540fb31d2c8ecae86518a82763279e4aa6cac266cd352c2b2507df0335c0199f8b3d78
vijaydasmp added a commit to vijaydasmp/dash that referenced this issue Sep 28, 2021
6541d59 Add LSan suppression warnings (practicalswift)
ff7212e Add ASan Travis build (practicalswift)
ebd3bf2 Make test p2p_invalid_messages.py pass: Allow for expected Travis ASAN memory increase (practicalswift)

Pull request description:

  Add ASan Travis build.

Tree-SHA512: b9712aaf0c9112b637b6ef0c5d93961863dcbecaf31d9561eb09258a61540fb31d2c8ecae86518a82763279e4aa6cac266cd352c2b2507df0335c0199f8b3d78
vijaydasmp added a commit to vijaydasmp/dash that referenced this issue Sep 28, 2021
6541d59 Add LSan suppression warnings (practicalswift)
ff7212e Add ASan Travis build (practicalswift)
ebd3bf2 Make test p2p_invalid_messages.py pass: Allow for expected Travis ASAN memory increase (practicalswift)

Pull request description:

  Add ASan Travis build.

Tree-SHA512: b9712aaf0c9112b637b6ef0c5d93961863dcbecaf31d9561eb09258a61540fb31d2c8ecae86518a82763279e4aa6cac266cd352c2b2507df0335c0199f8b3d78
vijaydasmp added a commit to vijaydasmp/dash that referenced this issue Sep 30, 2021
6541d59 Add LSan suppression warnings (practicalswift)
ff7212e Add ASan Travis build (practicalswift)
ebd3bf2 Make test p2p_invalid_messages.py pass: Allow for expected Travis ASAN memory increase (practicalswift)

Pull request description:

  Add ASan Travis build.

Tree-SHA512: b9712aaf0c9112b637b6ef0c5d93961863dcbecaf31d9561eb09258a61540fb31d2c8ecae86518a82763279e4aa6cac266cd352c2b2507df0335c0199f8b3d78
vijaydasmp added a commit to vijaydasmp/dash that referenced this issue Oct 1, 2021
6541d59 Add LSan suppression warnings (practicalswift)
ff7212e Add ASan Travis build (practicalswift)
ebd3bf2 Make test p2p_invalid_messages.py pass: Allow for expected Travis ASAN memory increase (practicalswift)

Pull request description:

  Add ASan Travis build.

Tree-SHA512: b9712aaf0c9112b637b6ef0c5d93961863dcbecaf31d9561eb09258a61540fb31d2c8ecae86518a82763279e4aa6cac266cd352c2b2507df0335c0199f8b3d78
vijaydasmp added a commit to vijaydasmp/dash that referenced this issue Oct 1, 2021
vijaydasmp added a commit to vijaydasmp/dash that referenced this issue Oct 2, 2021
6541d59 Add LSan suppression warnings (practicalswift)
ff7212e Add ASan Travis build (practicalswift)
ebd3bf2 Make test p2p_invalid_messages.py pass: Allow for expected Travis ASAN memory increase (practicalswift)

Pull request description:

  Add ASan Travis build.

Tree-SHA512: b9712aaf0c9112b637b6ef0c5d93961863dcbecaf31d9561eb09258a61540fb31d2c8ecae86518a82763279e4aa6cac266cd352c2b2507df0335c0199f8b3d78
vijaydasmp added a commit to vijaydasmp/dash that referenced this issue Oct 2, 2021
vijaydasmp added a commit to vijaydasmp/dash that referenced this issue Oct 4, 2021
…etect use of uninitialized memory

870f0cd build: Add MemorySanitizer (MSan) in Travis to detect use of uninitialized memory (practicalswift)

Pull request description:

  Add MemorySanitizer (MSan) in Travis to detect use of uninitialized memory.

  First UBSan, then ASan followed by TSan... and now: yes, the wait is over -- **MSan is finally here!** :)

  Some historical context:
  * 2017: Continuous compilation with Clang Thread Safety analysis enabled (bitcoin#10866, bitcoin#10923)
  * 2018: Continuous testing with trapping on signed integer overflows (`-ftrapv`) (bitcoin#12686)
  * 2018: Continuous testing of use of locale dependent functions (bitcoin#13041)
  * 2018: Continuous testing of format strings (bitcoin#13705)
  * 2018: Continuous compilation with MSVC `TreatWarningAsError` (bitcoin#14151)
  * 2018: Continuous testing under UndefinedBehaviorSanitizer – UBSan (bitcoin#14252, bitcoin#14673, bitcoin#17006)
  * 2018: Continuous testing under AddressSanitizer – ASan (bitcoin#14794, bitcoin#17205, bitcoin#17674)
  * 2018: Continuous testing under ThreadSanitizer – TSan (bitcoin#14829)
  * 2019: Continuous testing in an unsigned char environment (`-funsigned-char`) (bitcoin#15134)
  * 2019: Continuous compile-time testing of assumptions we're making (bitcoin#15391)
  * 2019: Continuous testing of fuzz test cases under Valgrind (bitcoin#17633, bitcoin#18159, bitcoin#18166)
  * 2020: Finally... MemorySanitizer – MSAN! :)

  What is the next step? What tools should we add to CI to keep bugs from entering `master`? :)

ACKs for top commit:
  MarcoFalke:
    ACK 870f0cd

Tree-SHA512: 38327c8b75679d97d469fe42e704cacd1217447a5a603701dd8a58ee50b3be2c10248f8d68a479ed081c0c4b254589d3081c9183f991640b06ef689061f75578
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants