-
Notifications
You must be signed in to change notification settings - Fork 101
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 failure of 'sgn_1' with musl libc #384
Comments
@hhoffstaette As best I can tell from looking at the source code, the "2 < 20" is referring to the fact that the value of 2 guard bits specified on the command line is too small for the data to be encoded, and the encoder believes that the number of guard bits should be at least 20. Although I cannot say definitively that this is bug in musl, I am very suspicious that this might be the case, given that none of the code in JasPer that calculates the number of necessary guard bits has been changed in a long time as far as I can recall. One thing that would be potentially helpful to know: If you move the print statement that outputs the "too few guard bits" message prior to the "if" body in which it is located for the case where things work (i.e., no using musl), what values does it print? In other words, in a situation where things work, what does it think that the two printed integers (related to numbers of guard bits) are equal to? |
I enabled this line by removing the guard. on glibc (success):
on musl (failure):
So the difference is the "numgbits 2 mingbits 0" vs. "numgbits 2 mingbits 20", |
@hhoffstaette Thanks for checking this. So, it would appear that the use of musl somehow results in the number of necessary guard bits being computed incorrectly. Unfortunately, I don't recall how the number of guard bits is computed, since I wrote the code for that about 20 years ago |
jasper/src/libjasper/jpc/jpc_enc.c Line 554 in 8766848
Update: that's not it, sorry. Somehow the expected value of 2 gets turned into a 20 somewhere else. |
Someone also reproduced this bug on arm (32-bit) with glibc, so apparently it's not just musl itself. |
Gentoo CI noticed a test suite failure on musl
Out of curiosity I tried to reproduce it and indeed can do so (with 4.2.2 and also the latest 4.2.4), which is odd and probably a musl problem since the test suite of 4.2.2 passes on glibc 🎉
The test output summary says:
and the specific test is:
Looking at the test arguments, it does pass
numgbits=2
and then complains about that, so it's not clear what is going here or why it succeeds on glibc.Any idea what the problem might be? I can provide the full log if necessary.
The text was updated successfully, but these errors were encountered: