Skip to content

Conversation

@pravblockc
Copy link

Backport: Merge bitcoin#17708: prevector: avoid misaligned member accesses
add ubsan supressions for below errors
runtime error: load of value 210, which is not a valid value for type 'bool'
runtime error: null pointer passed as argument 1, which is declared to never be null !=

5f26855 test: Remove ubsan alignment suppressions (Wladimir J. van der Laan)
9d933ef prevector: avoid misaligned member accesses (Anthony Towns)

Pull request description:

  Ensure prevector data is appropriately aligned. Earlier discussion in bitcoin#17530.

  **Edit laanwj**: In contrast to bitcoin#17530, it does this without increase in size of any of the coin cache data structures (x86_64, clang)

  | Struct        | (size,align) before           | (size,align) after  |
  | ------------- | ------------- | ------- |
  | Coin | 48, 8        |     48, 8   |
  | CCoinsCacheEntry | 56, 8    |   56, 8  |
  | CScript | 32, 1       |      32, 8  |

ACKs for top commit:
  laanwj:
    ACK 5f26855
  practicalswift:
    ACK 5f26855
  jonatack:
    ACK 5f26855

Tree-SHA512: 98d112d6856f683d5b212410b73f3071d2994f1efb046a2418a35890aa1cf1aa7c96a960fc2e963fa15241e861093c1ea41951cf5b4b5431f88345eb1dd0a98a
@PastaPastaPasta PastaPastaPasta changed the title Backports v0.20 pr1 Backports #17708 Sep 23, 2021
@UdjinM6 UdjinM6 changed the title Backports #17708 Merge bitcoin#17708: prevector: avoid misaligned member accesses Sep 24, 2021
@UdjinM6 UdjinM6 added this to the 18 milestone Sep 24, 2021
UdjinM6
UdjinM6 previously approved these changes Sep 24, 2021
Copy link

@UdjinM6 UdjinM6 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, utACK

@PastaPastaPasta
Copy link
Member

Why is 54bbfb4 here? Seems to just revert part of the merge?

@pravblockc
Copy link
Author

Why is 54bbfb4 here? Seems to just revert part of the merge?

No, Actually I have added to suppress below warning which are Dash specific. It has to be resolved at a later stage along with others. In case if is not acceptable, would you prefer to resolve now itself?
runtime error: load of value 210, which is not a valid value for type 'bool'
runtime error: null pointer passed as argument 1, which is declared to never be null !=

@PastaPastaPasta
Copy link
Member

Why should we suppress these warnings though? They are proper warnings right that should be fixed?

@pravblockc
Copy link
Author

As we discussed, dash specific errors/warnings has been fixed without suppression.
@UdjinM6 @PastaPastaPasta

Copy link

@UdjinM6 UdjinM6 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK

Copy link
Member

@PastaPastaPasta PastaPastaPasta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK for merging via merge commit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants