From Bugzilla Helper: User-Agent: Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0) Description of problem: Implementation of __moddi3 in libc-2.2.5.so supplied with RH7.3 does not produce the correct result in some cases. Works fine on RH7.2 (libc-2.2.4). Example: Calculation of -10L % -7L results in 3 instead of -3. Version-Release number of selected component (if applicable): 2.2.5 How reproducible: Always Steps to Reproduce: 1. Write the following c-program: #include <stdio.h> typedef long long s8; void printMod(s8 a, s8 b) { printf("%lld %% %lld = %lld\n", a, b, a%b); } int main(void) { printMod(-10L, -7L); printMod(-10L, 7L); printMod(10L, -7L); printMod(10L, 7L); return 0; } 2. Compile 2 versions like: gcc -o the_good myprog.c gcc -o the_bad -lc myprog.c 3. Run programs Actual Results: the_good prints: -10 % -7 = -3 -10 % 7 = -3 10 % -7 = 3 10 % 7 = 3 the_bad prints: -10 % -7 = 3 -10 % 7 = -3 10 % -7 = -3 10 % 7 = 3 Expected Results: both compiles should produce the same (correct) results Additional info: Although not yet verified, other problems with arithmetic operations in this libc version are suspected.
http://rhn.redhat.com/errata/RHBA-2002-116.html obsoleted by 2 security erratas in the meantime.