WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
286664
REGRESSION(
241230@main
): [cairo] convertImagePixels copies wrongly if source.format.alphaFormat == destination.format.alphaFormat && source.format.pixelFormat == destination.format.pixelFormat
https://bugs.webkit.org/show_bug.cgi?id=286664
Summary
REGRESSION(241230@main): [cairo] convertImagePixels copies wrongly if source....
Fujii Hironori
Reported
2025-01-28 20:51:57 PST
While creating an API test of `convertImagePixels`, I found out a bug in `convertImagePixels`.
https://github.com/WebKit/WebKit/blob/53ee544dee9b8fc6610d0ce70f23c673804bbd03/Source/WebCore/platform/graphics/PixelBufferConversion.cpp#L318-L321
> if (source.format.alphaFormat == destination.format.alphaFormat && source.format.pixelFormat == destination.format.pixelFormat) { > memcpySpan(destination.rows, source.rows.first(source.bytesPerRow * destinationSize.height())); > return; > }
This code doesn't take destinationSize into account. Also, if source.bytesPerRow != destination.bytesPerRow, this code doesn't work. This code was added by
241230@main
.
Attachments
Add attachment
proposed patch, testcase, etc.
Fujii Hironori
Comment 1
2025-01-28 20:57:58 PST
I'm observing an assertion failure in the fast code path for my new API test. ASSERTION FAILED: destination.size() >= source.size() C:\webkit\wb\WebKitBuild\Debug\WTF\Headers\wtf/StdLibExtras.h(1036) : void WTF::memcpySpan(std::span<T, TExtent>, std::span<U, UExtent>) [T = unsigned char, TExtent = 18446744073709551615ULL, U = const unsigned char, UExtent = 18446744073709551615ULL] 1 00007FFAE51F3FE1 WTF::memcpySpan<unsigned char,18446744073709551615,const unsigned char,18446744073709551615> 2 00007FFAE97F6D4C WebCore::convertImagePixels 3 00007FF67D0A2A47 TestWebKitAPI::PixelBufferConversionTests_convertImagePixels2_Test::TestBody::<lambda_0>::operator() 4 00007FF67D0A25F7 TestWebKitAPI::PixelBufferConversionTests_convertImagePixels2_Test::TestBody 5 00007FF67D193FE0 testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test,void> 6 00007FF67D16C86A testing::internal::HandleExceptionsInMethodIfSupported<testing::Test,void> 7 00007FF67D154A63 testing::Test::Run 8 00007FF67D1552A6 testing::TestInfo::Run 9 00007FF67D155942 testing::TestSuite::Run 10 00007FF67D15F644 testing::internal::UnitTestImpl::RunAllTests 11 00007FF67D1950F0 testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl,bool> 12 00007FF67D16E4AA testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl,bool> 13 00007FF67D15F20E testing::UnitTest::Run 14 00007FF67CF76821 RUN_ALL_TESTS 15 00007FF67CF76702 TestWebKitAPI::TestsController::run 16 00007FF67D12515D main 17 00007FF67D196F00 __scrt_common_main_seh 18 00007FFBFC96259D BaseThreadInitThunk 19 00007FFBFCF4AF38 RtlUserThreadStart
Fujii Hironori
Comment 2
2025-01-28 21:36:57 PST
Pull request:
https://github.com/WebKit/WebKit/pull/39673
EWS
Comment 3
2025-01-29 12:58:53 PST
Committed
289520@main
(1de35d8ca5de): <
https://commits.webkit.org/289520@main
> Reviewed commits have been landed. Closing PR #39673 and removing active labels.
Radar WebKit Bug Importer
Comment 4
2025-01-29 12:59:14 PST
<
rdar://problem/143841035
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug