From: Jeremy F. <je...@go...> - 2003-04-15 01:16:36
|
Quoting Sebastian <sc...@nb...>: > It extracted all functions taking part in this code to extra files and > ran > some tests, without successes. The situation is quite simple: > be_random > returns one random unsigned int (in %eax), %edx is zeroed out, a 64 > bit > integer is temporarily created on the stack and the resulting number > is > loaded into a double register (fildll). Well, the behaviour you're seeing is consistent with be_random() returning an undefined value in %eax. FP instructions like fildll immediately check the defined-ness of their values (unlike integer instructions, which only check for defined-ness when the value is used as a pointer or in a conditional instruction). It may be that be_random() has a bug, or it is returning an undefined value as a result of an undefined input. There doesn't seem to be anything wrong with this particular piece of code, or with Valgrind's behaviour. J |