Repository navigation
Conversation
|
Thank you for your contribution. Since you are not yet a member of the Ceph organization with write permissions on ceph/ceph.git, our CI will not automatically run. Any member of the Ceph organization may label this PR |
|
jenkins test make check |
|
jenkins test make check arm64 |
|
@NitzanMordhai could you review this? #73603 and #73608 (closed in favour of this one) fix the same uninitialized ifaddrs/sockaddr reads in test_ipaddr. |
NitzanMordhai
left a comment
There was a problem hiding this comment.
Minor: consider squashing the two commits. The first one's title covers the sockaddr locals but skips net, and the second just finishes that.
Other than that LGTM, thanks!
Several tests left fields of stack-allocated ifaddrs and
sockaddr_in{,6} structs uninitialized. Valgrind reports the code under
test branching on them:
- grade_addr() checks ifa_flags & IFF_UP
- getnameinfo() reads sin6_scope_id
Initialize these structs with {}, including net in place of its
memset. In the SkipLoopback tests, set ifa_flags = 0 instead of
clearing IFF_UP from an indeterminate value.
Assisted-by: claude-opus-5-5
Signed-off-by: Dominik Raddatz <[email protected]>
9893634 to
d63e1a5
Compare
Squashed, thanks! |
|
jenkins test windows |
|
This PR has been added to wip-bharath1-testing-20261114.051618-main. |
Several tests in
unittest_ipaddrbuildifaddrsandsockaddr_in{,6}structs on the stack without initializing all of their fields. The tests pass, but valgrind reports the code under test branching on uninitialized values:grade_addr()checksifa_flags & IFF_UPfor every candidate infind_ip_in_subnet_list()(pick_address.find_ip_in_subnet_list,pick_address.filtering)getnameinfo()readssin6_scope_idwhenpick_addresses()formats IPv6 candidates (pick_address.filtering)The results only come out right because each query happens to match a single interface.
Fix
Initialize these structs with
{}, includingnetin place of itsmemset. In the SkipLoopback tests, setifa_flags = 0instead of clearingIFF_UPfrom an indeterminate value.Testing
Contribution Guidelines
To sign and title your commits, please refer to Submitting Patches to Ceph.
If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.
When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an
xbetween the brackets:[x]. Spaces and capitalization matter when checking off items this way.Checklist
Show available Jenkins commands
jenkins test classic perfJenkins Job | Jenkins Job Definitionjenkins test crimson perfJenkins Job | Jenkins Job Definitionjenkins test signedJenkins Job | Jenkins Job Definitionjenkins test make checkJenkins Job | Jenkins Job Definitionjenkins test make check arm64Jenkins Job | Jenkins Job Definitionjenkins test submodulesJenkins Job | Jenkins Job Definitionjenkins test dashboardJenkins Job | Jenkins Job Definitionjenkins test dashboard cephadmJenkins Job | Jenkins Job Definitionjenkins test apiJenkins Job | Jenkins Job Definitionjenkins test docsReadTheDocs | Github Workflow Definitionjenkins test ceph-volume allJenkins Jobs | Jenkins Jobs Definitionjenkins test windowsJenkins Job | Jenkins Job Definitionjenkins test rook e2eJenkins Job | Jenkins Job DefinitionYou must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.