[coldfire-gnu-discuss] systemcall select() seems to overwrite variables on the stack

Maxim Kuvyrkov maxim at codesourcery.com
Sun Oct 24 21:03:18 UTC 2010


On 10/12/10 2:33 AM, Andreas Wehrmann wrote:
> A colleague and I managed to write a test program that reproduces a
> problem related to calling select(). In the test program, when compiled
> with optimization (-O2), the second call to select() never returns, not
> even after the timeout.

Andreas,

I cannot reproduce this problem.  On M5485EVB board with 2.6.25 kernel I 
get:

[m5485 tmp]$ ./a.out
before select_fd=67 | nfds=68 | sec = 5 | usec = 0
after select_fd=67 | nfds=68 | sec = 0 | usec = 0 | retval = 0
before select_fd=67 | nfds=68 | sec = 5 | usec = 0
< a minute passes by >
[m5485 tmp]$

Can there be a problem in your kernel?

Regards,

-- 
Maxim Kuvyrkov
CodeSourcery
maxim at codesourcery.com
(650) 331-3385 x724



More information about the coldfire-gnu-discuss mailing list