-
Notifications
You must be signed in to change notification settings - Fork 284
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
Test from #365 reveals more issues in LoaderExifJpeg #933
Comments
@awilfox could you run the test suite with ASAN + UBSAN on aarch64 & ppc? I don't have access to a machine with these architectures, so I cannot really test it. You can turn the sanitizers on by passing the |
I'm trying very hard to manage to build the sanitisers against musl but it's been a long arduous process and they still aren't building. Unfortunately Google did not care much about portability when they wrote this. It may be a while before I can report anything, and I'm not sure the reports would be reliable even if I can end up generating them. |
Which platform are you on? Alpine? |
Adélie Linux; we're a completely separate distro that is based on musl libc. (Alpine doesn't support PowerPC beyond a little-endian build that only supports POWER8 CPUs.) When I have free time, I will try to install Fedora on my Raspberry Pi 3 and see if I can reproduce this issue on aarch64/glibc. Then I would be able to use ASan/UBSAN. |
This issue is also present on openSUSE on ARM and PPC, so this is likely not specific to Adélie Linux but rather to the CPU architecture differences. |
I'm going to close this. Team Exiv2 can't fix issues on unsupported platforms. We are happy to accept tested PR which don't disturb our test suite running on the platforms we actively support. |
Someone asked for help here - https://twitter.com/pixlsus/status/1405372762747637766
In the Makefile I see many |
But it does not tell more details what exactly fails... |
I think some of the README is unfortunately a bit outdated... :/
If you know what's failing you can then also go into the
|
The difference on Linux ARM64 is that there is no exception thrown here: 341de45#diff-c7886fda6bb67352b3031d9a1f4950f7b6817fd8d9952087d82c7a71bd88c9b6R175-R178 This leads to different output on stderr and different return code. |
The problem is at Line 526 in 19000cd
Here on ARM64 it sets |
ppc64 and aarch64 do not raise exception and thus output and exit code for test is different. See: Exiv2/exiv2#365 and Exiv2/exiv2#933 * gnu/packages/image.scm (exiv2)[arguments]: Add 'adjust-tests' phase. Co-authored-by: Ludovic Courtès <ludo@gnu.org>
on riscv64 the digging the code gives me some hints:
The I have experienced this very same problem on a riscv64 virtual machine where |
signedness of char type in c++/c is implementation-defined behavior, it should not be depended on.
In practice, x86 and its successor amd64 use signed implementations, and ARM, Power, and RISC-V use unsigned implementations. |
The newest version in main branch passes all tests on riscv64. However, it's hard to find which commit fixes this. Hope a new version can be released soon :) |
Describe the bug
Nominally, a test failure.
Practically, potentially a much worse issue.
To Reproduce
Steps to reproduce the behaviour:
Expected behavior
test_run (bugfixes.github.test_CVE_2018_12265.AdditionOverflowInLoaderExifJpeg) ... OK
Actual behaviour
test_run (bugfixes.github.test_CVE_2018_12265.AdditionOverflowInLoaderExifJpeg) ... FAIL
Desktop (please complete the following information):
-O2 -ggdb -mcpu=970 -mtune=power9 -maltivec -mlong-double-64 -fno-inline-small-functions
-O2 -ggdb -mcpu=G3 -fno-omit-frame-pointer -mfpu=dp_full
-O2 -ggdb -mtune=cortex-a53
Additional context
Setting a breakpoint in the ctor of LoaderExifJpeg shows the following output:
on x86 (i586):
on ppc:
on aarch64:
Note the really weird parIdx and id in the not-x86 runs.
The text was updated successfully, but these errors were encountered: