Hello: I have run into problem using sigaddset() in kernel code. The problem is reproducible in user space with kernel sigaddset definition. I have a problem where a code like the following gets miscompiled: sigset_t a; sigset_t b; sigset_t c; ........... sigaddset(&a, const1); sigaddset(&a, const2); ................................ b =a; /* this line causes incorrect code; any 64-bit assignment seems to cause a problem! */ sigaddset(&c, const2); sigaddset(&c, const3); /* more sigaddset to c */ At some iteration of sigaddset to c, c gets the value of a! Again, the problem is reproducible in user space. Both gcc 2.96 and gcc 3.2.3 are affected. So, the problem should be relevant for both 2.4 and 2.6 kernels. Attached please find a C code that that demonstrates the problem. It can be compiled to user space and kernel module . When compiled without optimization or with "-O", the problem goes away. When replacing sigaddset with set_bit, the problem goes away as well. Trying to run the problematic code in the debugger shows totally wild behavior. I have not analyzed the disassembly yet, so I cannot say what goes wrong. It seems a workaround to this problem is required in kernel source as it potentially breaks signal code. Is sigaddset misses some registers in clobbered list? Anybody is willing to crack a workaround? THX. -- ---------------------------------------- Constantine Gavrilov Kernel Developer Qlusters Software Ltd 1 Azrieli Center, Tel-Aviv Phone: +972-3-6081977 Fax: +972-3-6081841 ----------------------------------------