-
Notifications
You must be signed in to change notification settings - Fork 606
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(ImageBuf): fix crash when mutable Iterator used with read-IB (#3997)
The following sequence would have a floating point exception: // Readable IB backed by ImageCache ImageBuf buf("file.exr"), 0, 0, ImageCache::create()); // Make a mutable iterator, even though it's an image file reference. ImageBuf::Iterator<float> it(buf); <----- CRASHES INSIDE HERE! The problem was in ImageBuf::IteratorBase::init_ib, several steps taken if it's a mutable IB looking at a "read-only" IC-backed file, including calling make_writable() on the buffer. But we neglected to set m_localpixels to true. Fixes #3770 --------- Signed-off-by: Larry Gritz <[email protected]>
- Loading branch information
Showing
3 changed files
with
44 additions
and
11 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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