Remove unused boost headers from pch.h files#2323
Closed
nvmkuruc wants to merge 1 commit intoPixarAnimationStudios:devfrom
Closed
Remove unused boost headers from pch.h files#2323nvmkuruc wants to merge 1 commit intoPixarAnimationStudios:devfrom
pch.h files#2323nvmkuruc wants to merge 1 commit intoPixarAnimationStudios:devfrom
Conversation
24c1a32 to
a0bdec7
Compare
Contributor
|
Filed as internal issue #USD-8084 |
Member
|
@nvmkuruc , we're going to close this in favor of rerunning our internal pch-generator script so we can be confident we'll continue to get the right results going forward. Thanks, though! |
musicinmybrain
pushed a commit
to musicinmybrain/OpenUSD
that referenced
this pull request
Apr 7, 2026
…ecoder) (PixarAnimationStudios#2323) In the `EXR_PIXEL_FLOAT` branch of `undo_pxr24_impl()`, the expressions (uint64_t)(w * 3) compute the signed 32-bit product `w * 3` before the cast to `uint64_t`. When `w` is large this is undefined behavior under the C standard; on two's-complement builds without sanitizers the result wraps to a small positive value, which can cause the bounds check if (nDec + (uint64_t)(w * 3) > outSize) to pass incorrectly. If the check is bypassed the decode loop proceeds to write `4*w` bytes through `dout`, potentially far beyond the allocated output buffer. Fix: cast `w` to `uint64_t` before multiplying so that both the bounds check and the counter update are performed entirely in 64-bit unsigned arithmetic: (uint64_t)w * 3 (cast before multiply, not after) The `EXR_PIXEL_UINT` and `EXR_PIXEL_HALF` decode branches are unaffected: they reuse the pre-computed `nBytes` variable, which is already formed as `(uint64_t)(w) * (uint64_t)(bytes_per_element)`. Also fix the symmetric issue in `apply_pxr24_impl()` (the encoder): lastIn += w * 4 advances a pointer by a signed 32-bit product; corrected to lastIn += (uint64_t)w * 4 Made-with: Cursor Signed-off-by: Cary Phillips <cary@ilm.com>
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.
Description of Change(s)
boost/mpl/or.hpp,boost/mpl/if.hpp,boost/mpl/and.hpp,boost/type_traits/is_signed.hpp, andboost/utility/in_place_factory.hppare no longer used in thepxrcode base and can be safely removed from allpch.hfiles.Fixes Issue(s)
boost::in_placewithemplacemethod #2291