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

ztest: use ASSERT3P to compare pointers #16115

Merged
merged 1 commit into from
Apr 22, 2024

Conversation

brooksdavis
Copy link
Contributor

@brooksdavis brooksdavis commented Apr 19, 2024

With a sufficently modern gcc (I saw this with gcc13), gcc complains when casting pointers to an integer of a different type (even a larger one). On 32-bt ASSERT3U does this on 32-bit systems by casting a 32-bit pointer to uint64_t so use ASSERT3P which uses uintptr_t.

Fixes: 5caeef0 RAID-Z expansion feature

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Performance enhancement (non-breaking change which improves efficiency)
  • Code cleanup (non-breaking change which makes code smaller or more readable)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Library ABI change (libzfs, libzfs_core, libnvpair, libuutil and libzfsbootenv)
  • Documentation (a change to man pages or other documentation)

Checklist:

With a sufficently modern gcc (I saw this with gcc13), gcc complains
when casting pointers to an integer of a different type (even a larger
one).  On 32-bt ASSERT3U does this on 32-bit systems by casting a 32-bit
pointer to uint64_t so use ASSERT3P which uses uintptr_t.

Fixes: 5caeef0 RAID-Z expansion feature
Signed-off-by: Brooks Davis <[email protected]>
freebsd-git pushed a commit to freebsd/freebsd-src that referenced this pull request Apr 19, 2024
Fixes i386-gcc13 build.  Direct commit while waiting for upstream.

Pull Request: openzfs/zfs#16115
@behlendorf behlendorf added the Status: Code Review Needed Ready for review and testing label Apr 19, 2024
@behlendorf behlendorf added Status: Accepted Ready to integrate (reviewed, tested) and removed Status: Code Review Needed Ready for review and testing labels Apr 19, 2024
@behlendorf behlendorf merged commit 7e52795 into openzfs:master Apr 22, 2024
24 of 25 checks passed
bsdjhb pushed a commit to bsdjhb/cheribsd that referenced this pull request Aug 9, 2024
Fixes i386-gcc13 build.  Direct commit while waiting for upstream.

Pull Request: openzfs/zfs#16115
lundman pushed a commit to openzfsonwindows/openzfs that referenced this pull request Sep 4, 2024
With a sufficiently modern gcc (I saw this with gcc13), gcc complains
when casting pointers to an integer of a different type (even a larger
one).  On 32-bt ASSERT3U does this on 32-bit systems by casting a 32-bit
pointer to uint64_t so use ASSERT3P which uses uintptr_t.

Fixes: 5caeef0 RAID-Z expansion feature

Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Brooks Davis <[email protected]>
Closes openzfs#16115
gamanakis pushed a commit to gamanakis/zfs that referenced this pull request Sep 16, 2024
With a sufficiently modern gcc (I saw this with gcc13), gcc complains
when casting pointers to an integer of a different type (even a larger
one).  On 32-bt ASSERT3U does this on 32-bit systems by casting a 32-bit
pointer to uint64_t so use ASSERT3P which uses uintptr_t.

Fixes: 5caeef0 RAID-Z expansion feature

Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Brooks Davis <[email protected]>
Closes openzfs#16115
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Accepted Ready to integrate (reviewed, tested)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants