ci: Enable address sanitizer (ASan) stack-use-after-return checking #17205

pull practicalswift wants to merge 1 commits into bitcoin:master from practicalswift:asan-detect_stack_use_after_return changing 1 files +1 −1
  1. practicalswift commented at 11:57 AM on October 21, 2019: contributor

    Enable address sanitizer (ASan) stack-use-after-return checking (detect_stack_use_after_return=1).

    Example:

    #include <iostream>
    #include <string>
    
    const std::string& get_string(int i) {
        return std::to_string(i);
    }
    
    int main() {
        std::cout << get_string(41) << "\n";
    }
    

    Without address sanitizer (ASan) stack-use-after-return checking:

    $ ./stack-use-after-return
    
    $
    

    With address sanitizer (ASan) stack-use-after-return checking:

    $ ASAN_OPTIONS="detect_stack_use_after_return=1" ./stack-use-after-return
    =================================================================
    ==10400==ERROR: AddressSanitizer: stack-use-after-return on address 0x7f7fa0400030 at pc 0x00000049d2cc bp 0x7ffcbd617070 sp 0x7ffcbd616820
    READ of size 2 at 0x7f7abbecd030 thread T0
        [#0](/github-metadata-backup-bitcoin-bitcoin/0/) 0x439781 in fwrite
        [#1](/github-metadata-backup-bitcoin-bitcoin/1/) 0x7f7ac0504cb3 in std::basic_ostream<char, std::char_traits<char> >& std::__ostream_insert<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*, long) (/usr/lib/x86_64-linux-gnu/libstdc++.so.6+0x113cb3)
        [#2](/github-metadata-backup-bitcoin-bitcoin/2/) 0x4f9b5f in main stack-use-after-return.cpp:9:15
        [#3](/github-metadata-backup-bitcoin-bitcoin/3/) 0x7f7abf440b96 in __libc_start_main
        [#4](/github-metadata-backup-bitcoin-bitcoin/4/) 0x41bbc9 in _start
    …
    $
    
  2. ci: Enable address sanitizer (ASan) stack-use-after-return checking 8d22ab0e50
  3. fanquake added the label Tests on Oct 21, 2019
  4. laanwj commented at 2:12 PM on October 21, 2019: member

    Concept ACK

  5. MarcoFalke referenced this in commit 4aaeb04497 on Oct 22, 2019
  6. MarcoFalke merged this on Oct 22, 2019
  7. MarcoFalke closed this on Oct 22, 2019

  8. sidhujag referenced this in commit 99cd121717 on Oct 26, 2019
  9. practicalswift cross-referenced this on Mar 7, 2020 from issue build: Add MemorySanitizer (MSan) in Travis to detect use of uninitialized memory by practicalswift
  10. MarkLTZ cross-referenced this on Apr 4, 2020 from issue Bitcoin PR tracking by MarkLTZ
  11. MarcoFalke referenced this in commit 7027c67cac on Jul 2, 2020
  12. deadalnix referenced this in commit 6e9dc69ab3 on Dec 28, 2020
  13. deadalnix referenced this in commit b3710dba28 on Dec 29, 2020
  14. practicalswift deleted the branch on Apr 10, 2021
  15. vijaydasmp referenced this in commit dfa262c93f on Oct 4, 2021
  16. kwvg referenced this in commit 70e7ad3b42 on Mar 25, 2022
  17. kwvg referenced this in commit 51d583f91c on Apr 7, 2022
  18. kwvg referenced this in commit 72b21300ba on Jun 22, 2022
  19. kwvg referenced this in commit 8652b2ca1e on Jul 1, 2022
  20. UdjinM6 referenced this in commit ef8cf4bfea on Jul 2, 2022
  21. bitcoin locked this on Aug 18, 2022

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-05-20 06:54 UTC