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:

    0#include <iostream>
    1#include <string>
    2
    3const std::string& get_string(int i) {
    4    return std::to_string(i);
    5}
    6
    7int main() {
    8    std::cout << get_string(41) << "\n";
    9}
    

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

    0$ ./stack-use-after-return
    1
    2$
    

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

     0$ ASAN_OPTIONS="detect_stack_use_after_return=1" ./stack-use-after-return
     1=================================================================
     2==10400==ERROR: AddressSanitizer: stack-use-after-return on address 0x7f7fa0400030 at pc 0x00000049d2cc bp 0x7ffcbd617070 sp 0x7ffcbd616820
     3READ of size 2 at 0x7f7abbecd030 thread T0
     4    [#0](/bitcoin-bitcoin/0/) 0x439781 in fwrite
     5    [#1](/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)
     6    [#2](/bitcoin-bitcoin/2/) 0x4f9b5f in main stack-use-after-return.cpp:9:15
     7    [#3](/bitcoin-bitcoin/3/) 0x7f7abf440b96 in __libc_start_main
     8    [#4](/bitcoin-bitcoin/4/) 0x41bbc9 in _start
     9
    10$
    
  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. MarcoFalke referenced this in commit 7027c67cac on Jul 2, 2020
  10. deadalnix referenced this in commit 6e9dc69ab3 on Dec 28, 2020
  11. deadalnix referenced this in commit b3710dba28 on Dec 29, 2020
  12. practicalswift deleted the branch on Apr 10, 2021
  13. vijaydasmp referenced this in commit dfa262c93f on Oct 4, 2021
  14. kittywhiskers referenced this in commit 70e7ad3b42 on Mar 25, 2022
  15. kittywhiskers referenced this in commit 51d583f91c on Apr 7, 2022
  16. kittywhiskers referenced this in commit 72b21300ba on Jun 22, 2022
  17. kittywhiskers referenced this in commit 8652b2ca1e on Jul 1, 2022
  18. UdjinM6 referenced this in commit ef8cf4bfea on Jul 2, 2022
  19. DrahtBot 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: 2024-11-17 09:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me