reimaginemedia / webm

Automatically exported from code.google.com/p/webm
0 stars 0 forks source link

Runtime errors occurred in VP9/ActiveMapTest #949

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
This happened while building using clang. Runtime errors were shown in 
ActiveMap unit tests.

To reproduce it on Linux:

$ CC=clang CXX=clang++ LD=clang++ CFLAGS="-fsanitize=undefined 
-fno-strict-aliasing -fno-omit-frame-pointer -fno-optimize-sibling-calls" 
CXXFLAGS="-fsanitize=undefined -fno-omit-frame-pointer 
-fno-optimize-sibling-calls -g" LDFLAGS=-fsanitize=undefined ../libvpx/configure

$make
$ ./test_libvpx --gtest_filter=*VP9/ActiveMapTest.Test/2*

Output:
$ ./test_libvpx --gtest_filter=*VP9/ActiveMapTest.Test/2*
Note: Google Test filter = *VP9/ActiveMapTest.Test/2*-:AVX2/*
[==========] Running 1 test from 1 test case.
[----------] Global test environment set-up.
[----------] 1 test from VP9/ActiveMapTest
[ RUN      ] VP9/ActiveMapTest.Test/2
../libvpx/vp9/encoder/x86/vp9_variance_sse2.c:47:42: runtime error: load of 
misaligned address 0x7f8bd6cd32a7 for type 'const uint32_t' (aka 'const 
unsigned int'), which requires 4 byte alignment
0x7f8bd6cd32a7: note: pointer points here
 32 25 23 22 27  27 23 23 39 36 25 25 22  26 29 26 28 2f 27 23 24  33 2b 27 25 3a 3b 43 34  73 8c 90
             ^ 
../libvpx/vp9/encoder/x86/vp9_variance_sse2.c:47:42: runtime error: load of 
misaligned address 0x7f8bd6cd34c7 for type 'const uint32_t' (aka 'const 
unsigned int'), which requires 4 byte alignment
0x7f8bd6cd34c7: note: pointer points here
 32 25 23 22 27  27 23 23 39 36 25 25 22  26 29 26 28 2f 27 23 24  33 2b 27 25 3a 3b 43 34  73 8c 90
             ^ 
../libvpx/vp9/encoder/x86/vp9_variance_sse2.c:48:42: runtime error: load of 
misaligned address 0x7f8bd6cd36e7 for type 'const uint32_t' (aka 'const 
unsigned int'), which requires 4 byte alignment
0x7f8bd6cd36e7: note: pointer points here
 2e 26 39 2f 21  23 24 22 3a 44 25 2c 23  28 27 24 23 30 31 28 1f  39 39 23 29 2b 27 56 44  21 62 85
             ^ 
../libvpx/vp9/encoder/x86/vp9_variance_sse2.c:48:42: runtime error: load of 
misaligned address 0x7f8bd6cd3907 for type 'const uint32_t' (aka 'const 
unsigned int'), which requires 4 byte alignment
0x7f8bd6cd3907: note: pointer points here
 23 28 3a 37 2d  24 24 24 24 27 23 24 26  33 26 2d 31 3b 41 2e 34  25 29 25 27 26 24 77 58  18 51 72
             ^ 
../libvpx/vp9/encoder/x86/vp9_variance_sse2.c:45:42: runtime error: load of 
misaligned address 0x7f8bd6cd32a7 for type 'const uint32_t' (aka 'const 
unsigned int'), which requires 4 byte alignment
0x7f8bd6cd32a7: note: pointer points here
 32 25 23 22 27  27 23 23 39 36 25 25 22  26 29 26 28 2f 27 23 24  33 2b 27 25 3a 3b 43 34  73 8c 90
             ^ 
../libvpx/vp9/encoder/x86/vp9_variance_sse2.c:45:42: runtime error: load of 
misaligned address 0x7f8bd6cd34c7 for type 'const uint32_t' (aka 'const 
unsigned int'), which requires 4 byte alignment
0x7f8bd6cd34c7: note: pointer points here
 32 25 23 22 27  27 23 23 39 36 25 25 22  26 29 26 28 2f 27 23 24  33 2b 27 25 3a 3b 43 34  73 8c 90
             ^ 
../libvpx/vp9/encoder/x86/vp9_variance_sse2.c:46:42: runtime error: load of 
misaligned address 0x7f8bd6cd36e7 for type 'const uint32_t' (aka 'const 
unsigned int'), which requires 4 byte alignment
0x7f8bd6cd36e7: note: pointer points here
 2e 26 39 2f 21  23 24 22 3a 44 25 2c 23  28 27 24 23 30 31 28 1f  39 39 23 29 2b 27 56 44  21 62 85
             ^ 
../libvpx/vp9/encoder/x86/vp9_variance_sse2.c:46:42: runtime error: load of 
misaligned address 0x7f8bd6cd3907 for type 'const uint32_t' (aka 'const 
unsigned int'), which requires 4 byte alignment
0x7f8bd6cd3907: note: pointer points here
 23 28 3a 37 2d  24 24 24 24 27 23 24 26  33 26 2d 31 3b 41 2e 34  25 29 25 27 26 24 77 58  18 51 72
             ^ 
[       OK ] VP9/ActiveMapTest.Test/2 (3489 ms)
[----------] 1 test from VP9/ActiveMapTest (3489 ms total)

[----------] Global test environment tear-down
[==========] 1 test from 1 test case ran. (3489 ms total)
[  PASSED  ] 1 test.

Original issue reported on code.google.com by yunqingw...@google.com on 10 Feb 2015 at 6:27

GoogleCodeExporter commented 9 years ago
These are expected, which is why they're filtered as 'low priority' in this 
test. This is safe within the context of the sse2 code.

Original comment by jz...@google.com on 11 Feb 2015 at 2:09

GoogleCodeExporter commented 9 years ago
In the code, it casts a unsigned char* to unsigned int*
*(const uint32_t *)(p + i * stride)
That doesn't sound right.

Original comment by yunqingw...@google.com on 11 Feb 2015 at 5:30

GoogleCodeExporter commented 9 years ago
Unaligned loads are allowed on intel platforms; a concern in the intrinsics 
would be a missing loadu for instance.

Original comment by jz...@google.com on 11 Feb 2015 at 6:58

GoogleCodeExporter commented 9 years ago
Should we mark this invalid?

Original comment by fgalli...@google.com on 12 Feb 2015 at 10:57

GoogleCodeExporter commented 9 years ago

Original comment by yunqingw...@google.com on 13 Feb 2015 at 12:41