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

Fix problems detected by CodeQL static analysis #1304

Merged
merged 1 commit into from
Oct 2, 2023

Conversation

charles-lunarg
Copy link
Collaborator

3 types of issues were found:

  • Incorrect format specifiers
  • Not providing required format specifies
  • Using alloca in a loop

There are multiple instances of alloca in loops, but to fix them would require significant refactoring. This commit includes 1 move of alloca inside a for loop to the outside, but this is because the logic was redoing work in a for loop that could have been done once at the start of the function.

@ci-tester-lunarg
Copy link

CI Vulkan-Loader build queued with queue ID 51658.

@ci-tester-lunarg
Copy link

CI Vulkan-Loader build # 2187 running.

1 similar comment
@ci-tester-lunarg
Copy link

CI Vulkan-Loader build # 2187 running.

@ci-tester-lunarg
Copy link

CI Vulkan-Loader build queued with queue ID 51671.

1 similar comment
@ci-tester-lunarg
Copy link

CI Vulkan-Loader build queued with queue ID 51671.

@ci-tester-lunarg
Copy link

CI Vulkan-Loader build # 2189 running.

@ci-tester-lunarg
Copy link

CI Vulkan-Loader build # 2189 passed.

@ci-tester-lunarg
Copy link

CI Vulkan-Loader build queued with queue ID 51741.

@ci-tester-lunarg
Copy link

CI Vulkan-Loader build # 2190 running.

@ci-tester-lunarg
Copy link

CI Vulkan-Loader build # 2190 passed.

@ci-tester-lunarg
Copy link

CI Vulkan-Loader build queued with queue ID 54212.

3 types of issues were found:
* Incorrect format specifiers
* Not providing required format specifies
* Using alloca in a loop

There are multiple instances of alloca in loops, but to fix them would
require significant refactoring. This commit includes 1 move of alloca inside
a for loop to the outside, but this is because the logic was redoing work
in a for loop that could have been done once at the start of the function.
@ci-tester-lunarg
Copy link

CI Vulkan-Loader build queued with queue ID 54223.

@ci-tester-lunarg
Copy link

CI Vulkan-Loader build # 2197 running.

@ci-tester-lunarg
Copy link

CI Vulkan-Loader build # 2197 passed.

@charles-lunarg
Copy link
Collaborator Author

Merging because CI passed in my fork.

@charles-lunarg charles-lunarg merged commit 0a5fdec into KhronosGroup:main Oct 2, 2023
41 checks passed
@charles-lunarg charles-lunarg deleted the fix_codeql_issues branch October 2, 2023 20:17
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