8000 fix __builtin_strncpy truncated compilation error by lplewa · Pull Request #1346 · oneapi-src/unified-memory-framework · GitHub
[go: up one dir, main page]

Skip to content
8000

fix __builtin_strncpy truncated compilation error #1346

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

Merged
merged 1 commit into from
Jun 2, 2025

Conversation

lplewa
Copy link
Contributor
@lplewa lplewa commented Jun 2, 2025

error: ‘__builtin_strncpy’ output may be truncated copying 4095 bytes from a string of length 4095 [-Werror=stringop-truncation]

Description

Checklist

  • Code compiles without errors locally
  • All tests pass locally
  • CI workflows execute properly
  • CI workflows, not executed per PR (e.g. Nightly), execute properly
  • New tests added, especially if they will fail without my changes
  • Added/extended example(s) to cover this functionality
  • Extended the README/documentation
  • All newly added source files have a license
  • All newly added source files are referenced in CMake files
  • Logger (with debug/info/... messages) is used
  • All API changes are reflected in docs and def/map files, and are tested

error: ‘__builtin_strncpy’ output may be truncated copying 4095 bytes
from a string of length 4095 [-Werror=stringop-truncation]
@lplewa lplewa requested a review from a team as a code owner June 2, 2025 10:20
@bratpiorka
Copy link
Contributor

@lplewa how did you find this? I'm curious why it wasn't caught by Coverity. could you add a test for it?

@lplewa
Copy link
Contributor Author
lplewa commented Jun 2, 2025

@lplewa how did you find this? I'm curious why it wasn't caught by Coverity. could you add a test for it?

I got a compilation error on my system when compiling with gcc + tsan - imho it's false positive

@bratpiorka bratpiorka merged commit 2028242 into oneapi-src:main Jun 2, 2025
87 checks passed
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.

3 participants
0