Avoid 1 << 31 (UB) in calculation of SEQUENCE_LOCKTIME_DISABLE_FLAG #14513

pull practicalswift wants to merge 1 commits into bitcoin:master from practicalswift:1<<31-again changing 1 files +1 −1
  1. practicalswift commented at 9:15 PM on October 18, 2018: contributor

    Avoid 1 << 31 (UB) in calculation of SEQUENCE_LOCKTIME_DISABLE_FLAG.

    Context: #14510 (comment)

  2. Avoid 1 << 31 (UB) in calculation of SEQUENCE_LOCKTIME_DISABLE_FLAG bc60c615a5
  3. promag commented at 9:37 PM on October 18, 2018: member

    ACK bc60c61.

  4. sipa commented at 9:42 PM on October 18, 2018: member
  5. laanwj commented at 9:51 PM on October 18, 2018: member

    AHHHHH not another one

  6. practicalswift commented at 10:15 PM on October 18, 2018: contributor

    @laanwj Having an UBSAN build running the functional tests would help us guard against the introduction of new UB:s in the code base.

    I've said it before but I find it troubling that we don't use all relevant sanitizers (ASAN, UBSAN, etc.) in Travis. I hope to be able to help change that: please review or concept ACK the PR #14252 which introduces an UBSAN Travis build running the functional tests.

    Regarding UB:s already in the code base – I'll keep on digging: see https://twitter.com/practicalswift/status/1051524615204470784 :-) (Context: UB is one of Professor Regehr's areas of research – see his excellent papers and blog posts about UB)

  7. laanwj commented at 10:26 PM on October 18, 2018: member

    but this is a constant ! shouldn't it be possible to detect this statically?

  8. practicalswift commented at 10:39 PM on October 18, 2018: contributor

    @laanwj Yes, absolutely. Dynamic analysis and static analysis are just two different approaches to attacking the same problem: both should be used. (Just to be clear: obviously this specific case cannot be detected by dynamic analysis.)

    I was talking about dynamic analysis here since I believe the sanitizers would likely give us the most bang for the buck (especially ASAN and UBSAN) in terms of both precision and recall (for catching memory corruption bugs such as use-after-free:s, UB:s in general, etc.). So that's a good start.

    But as you know I have a lot of love also for static analysis (various forms of linters, etc.) :-) Dynamic or static – I love 'em all!

  9. ken2812221 commented at 12:19 AM on October 20, 2018: contributor

    ACK bc60c61

  10. sipa commented at 1:45 AM on October 20, 2018: member

    ACK

  11. sipa merged this on Oct 20, 2018
  12. sipa closed this on Oct 20, 2018

  13. sipa referenced this in commit b14db5abab on Oct 20, 2018
  14. MarcoFalke added the label Refactoring on Oct 20, 2018
  15. practicalswift deleted the branch on Apr 10, 2021
  16. PastaPastaPasta referenced this in commit 8f8ce78663 on Jun 27, 2021
  17. PastaPastaPasta referenced this in commit 7d379e2257 on Jun 28, 2021
  18. PastaPastaPasta referenced this in commit ed545447b8 on Jun 29, 2021
  19. PastaPastaPasta referenced this in commit 14241cd52a on Jul 1, 2021
  20. PastaPastaPasta referenced this in commit c9bad29c45 on Jul 1, 2021
  21. PastaPastaPasta referenced this in commit c72fff6bc4 on Jul 1, 2021
  22. DrahtBot locked this on Aug 16, 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-04-16 15:15 UTC

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