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

UNINIT reports on libjpeg_turbo [SSE2 instructions] #540

Open
derekbruening opened this issue Nov 28, 2014 · 2 comments
Open

UNINIT reports on libjpeg_turbo [SSE2 instructions] #540

derekbruening opened this issue Nov 28, 2014 · 2 comments

Comments

@derekbruening
Copy link
Contributor

From [email protected] on August 04, 2011 10:49:28

http://build.chromium.org/p/chromium.fyi/builders/Windows%20Tests%20%28DrMemory%29/builds/4691/steps/memory%20test%3A%20unit_1/logs/stdio UNINITIALIZED READ: reading 0x407e0738-0x407e0740 8 byte(s) within 0x407e0730-0x407e0740
#1 jsimd_ycc_extbgrx_convert_sse2
#2 jsimd_ycc_rgb_convert third_party\libjpeg_turbo\simd\jsimd_i386.c:199
#3 jsimd_ycc_rgb_convert third_party\libjpeg_turbo\simd\jsimd_i386.c:199
#4 sep_upsample third_party\libjpeg_turbo\jdsample.c:133
#5 process_data_context_main third_party\libjpeg_turbo\jdmainct.c:432
#6 chromium_jpeg_read_scanlines third_party\libjpeg_turbo\jdapistd.c:173
#7 gfx::JPEGCodec::Decode ui\gfx\codec\jpeg_codec.cc:539
#8 gfx::JPEGCodec::Decode ui\gfx\codec\jpeg_codec.cc:594
#9 history::ExpireHistoryTest::AddExampleData chrome\browser\history\expire_history_backend_unittest.cc:232
#10 history::ExpireHistoryTest_ArchiveHistoryBeforeStarred_Test::TestBody chrome\browser\history\expire_history_backend_unittest.cc:779
// the instruction in the global.PID.log during a local run is "movdqa (%esi) -> %xmm5"
// TODO: find out where does it propagate from. [ issue #170 would help here]

If "set JSIMD_FORCEMMX=1" to switch SSE2 implementation with MMX, the same test has 0 uninit reports.

SSE2 deals with floating-point operands and we require all bits to be set for FP registers [xref issue #471 ], that looks like the reason for the reports.

FTR, jsimd_h2v2_fancy_upsample_sse2 assembly is codesearch'able.

Original issue: http://code.google.com/p/drmemory/issues/detail?id=540

@mistmist
Copy link

Guess I've run into the same problem with LibreOffice, although somehow I don't get any uninit warnings from libjpeg-turbo itself; the earliest warnings I get are when the internal bitmap is written out as a PNG, so it took me some time to track down...

The uninit bytes can first be detected in the scan line buffer that comes out of jpeg-turbo's jpeg_read_scanlines(); naturally there's no conditionals in that place so it's not possible to write a suppression entry for it.

JSIMD_FORCEMMX=1 does work around the problem.

By the way, DrMemory really needs a equivalent of valgrind's memcheck's --track-origins=yes.

@zhaoqin
Copy link
Contributor

zhaoqin commented Nov 28, 2015

On Nov 26, 2015 4:34 PM, "mistmist" [email protected] wrote:

Guess I've run into the same problem with LibreOffice, although somehow I
don't get any uninit warnings from libjpeg-turbo itself; the earliest
warnings I get are when the internal bitmap is written out as a PNG, so it
took me some time to track down...

The uninit bytes can first be detected in the scan line buffer that comes
out of jpeg-turbo's jpeg_read_scanlines(); naturally there's no
conditionals in that place so it's not possible to write a suppression
entry for it.

JSIMD_FORCEMMX=1 does work around the problem.

By the way, DrMemory really needs a equivalent of valgrind's memcheck's
--track-origins=yes.

It takes significant efforts to add that, we welcome any contributions!

Reply to this email directly or view it on GitHub.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants