Repository navigation
Conversation
…sources Both are third-party code compiled into our targets, not libcvc's: - stb_image / stb_image_write's implementation is compiled into image/stb_io.cpp (stbi__g_failure_reason, the PNG chunk buffer, the PNG writer's filter tables): THIRD_PARTY matches ^stbiw?__. - Dear ImGui's stock imgui_impl_opengl3.cpp and imgui_freetype.cpp are compiled into cvcGL from the deps bundle (its GL loader table, loader handles, FreeType hooks): the new THIRD_PARTY_SOURCES matches their source path. The allowlist drops their 15 lines (cvc 4, cvcGL 11). Our own code in stb_io.cpp and in cvcGL's ImGui files is still scanned (tests).
Owner
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The writable-data scan leaves out two more pieces of third-party code that are compiled into our targets. They are not libcvc's, and no change of ours can move them onto the app (Joe: "we can't do anything about third party libs").
src/cvc/image/stb_io.cpp:stbi__g_failure_reason, the PNG chunk bufferinvalid_chunk, and the PNG writer's filter tables.THIRD_PARTYmatches^stbiw?__.invalid_chunkis a mutable static buffer that stb writes the unknown chunk's name into, so two threads decoding bad PNGs at once race on the error text.STBI_NO_FAILURE_STRINGSwould remove it, at the cost of stb's error messages. Not changed here.imgui_impl_opengl3.cpp(its GL loader tableimgl3wProcs, the loader handles,version) andimgui_freetype.cpp(its allocator and loader hooks) are compiled into cvcGL from the deps bundle. The newTHIRD_PARTY_SOURCESmatches their source path (/include/imgui*/backends|misc/), since every symbol of such an object is the library's.The allowlist drops their 15 lines (cvc 4, cvcGL 11). The ratchet passes, since only lines are removed.
Tests (
test_scan.py): both are left out, while our own code instb_io.cppand in cvcGL's ImGui files is still scanned. Locally: 16 pass (the end-to-end case skips without an ELF toolchain).Independent of the no-singletons stack (#1155 onward): it touches only
tools/singleton_scan, and the stack's PRs delete other allowlist lines.