Skip to content

Conversation

@gmartin82
Copy link
Contributor

@gmartin82 gmartin82 commented Dec 12, 2025

Description

Harden _z_iosli_copy() implementation in the event of z_malloc() failing and make z_iosli_copy_bytes() copy data rather than append to match the name and current usage.

Why is this change needed?

To prevent unexpected behaviour when memory cannot be allocated and to make z_iosli_copy_bytes() behave as a copy as per its name.


🏷️ Label-Based Checklist

Based on the labels applied to this PR, please complete these additional requirements:

Labels: bug

🐛 Bug Fix Requirements

Since this PR is labeled as a bug fix, please ensure:

  • Root cause documented - Explain what caused the bug in the PR description
  • Reproduction test added - Test that fails on main branch without the fix
  • Test passes with fix - The reproduction test passes with your changes
  • Regression prevention - Test will catch if this bug reoccurs in the future
  • Fix is minimal - Changes are focused only on fixing the bug
  • Related bugs checked - Verified no similar bugs exist in related code

Why this matters: Bugs without tests often reoccur.

Instructions:

  1. Check off items as you complete them (change - [ ] to - [x])
  2. The PR checklist CI will verify these are completed

This checklist updates automatically when labels change, but preserves your checked boxes.

@gmartin82 gmartin82 added the bug Something isn't working label Dec 12, 2025
@gmartin82 gmartin82 force-pushed the harden-iobuf branch 2 times, most recently from f5bdf97 to 475aed7 Compare December 12, 2025 18:03
@gmartin82 gmartin82 changed the title Harden iobuf and iosli Harden iobuf implementation Dec 12, 2025
@gmartin82 gmartin82 marked this pull request as ready for review December 12, 2025 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant