Skip to content

Conversation

@AlexMWells
Copy link
Contributor

Description

It was checking a "while" loops condition variable before the condition had executed causing false positive.

It was checking all elements of arrays causing false positives when only a subset of the array is actually being read from in "pointcloud_get", "spline", "splineinverse" calls. Implementation detail: in batched mode, to handle a varying count or knot count parameters a new version of osl_uninit_check_values_offset was added Fix message formatting for batched debug_uninit messages which was printing out pointer to the string instead of the strings themselves.

Tests

debug-uninit in testsuite was update to check for false positives for while(condition), spline, and splineinverse as well as correctly identifying uninitialized use of partially initialized arrays with spline and splineinverse.
Adding test for pointcloud_get was omitted due to local build configuration.

Checklist:

  • I have read the contribution guidelines.
  • I have updated the documentation, if applicable.
  • I have ensured that the change is tested somewhere in the testsuite (adding new test cases if necessary).
  • My code follows the prevailing code style of this project. If I haven't
    already run clang-format v17 before submitting, I definitely will look at
    the CI test that runs clang-format and fix anything that it highlights as
    being nonconforming.

…as checking a "while" loops condition variable before the condition had executed causing false positive.

It was checking all elements of arrays causing false positives when only a subset of the array is actually being read from in "pointcloud_get", "spline", "splineinverse" calls.  Implementation detail:  in batched mode, to handle a varying count or knot count parameters a new version of osl_uninit_check_values_offset was added
Fix message formatting for batched debug_uninit messages which was printing out pointer to the string instead of the strings themselves.

Signed-off-by: Alex M. Wells <[email protected]>
Signed-off-by: Alex M. Wells <[email protected]>
Signed-off-by: Alex M. Wells <[email protected]>
@AlexMWells AlexMWells requested a review from lgritz February 24, 2025 23:25
Copy link
Collaborator

@lgritz lgritz left a comment

Choose a reason for hiding this comment

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

Good catches, LGTM!

@lgritz lgritz merged commit 6cfa972 into AcademySoftwareFoundation:main Feb 25, 2025
26 checks passed
lgritz pushed a commit to lgritz/OpenShadingLanguage that referenced this pull request Feb 27, 2025
…demySoftwareFoundation#1947)

It was checking a "while" loops condition variable before the condition had executed causing false positive.

It was checking all elements of arrays causing false positives when only a subset of the array is actually being read from in "pointcloud_get", "spline", "splineinverse" calls. Implementation detail: in batched mode, to handle a varying count or knot count parameters a new version of osl_uninit_check_values_offset was added.

Fix message formatting for batched debug_uninit messages which was printing out pointer to the string instead of the strings themselves.

debug-uninit in testsuite was update to check for false positives for while(condition), spline, and splineinverse as well as correctly identifying uninitialized use of partially initialized arrays with spline and splineinverse.
Adding test for pointcloud_get was omitted due to local build configuration.

---------

Signed-off-by: Alex M. Wells <[email protected]>
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.

2 participants