Hi Everyone, (Sorry about the previous incomplete post). We are catching some Valgrind warnings when testing 32-bit x86 code. The warnings are:
==4782== Warning: client switching stacks? SP change: 0xbedc728c --> 0x4456a00 ==4782== to suppress, use: --max-stackframe=1164506996 or greater ==4782== Warning: client switching stacks? SP change: 0x4456a00 --> 0xbedc728c ==4782== to suppress, use: --max-stackframe=1164506996 or greater Notice the former sp is restored. I believe the warnings are due to one of two things. The first use is inline asm adjusting the stack pointer for SSE operations. The second use case is using sp as a general purpose register. For the warnings above this triggers them (AS2 is a macro in the inline asm that allows the code to work with GCC and MSVC): AS2( mov [ecx+16*12+16*4], esp) // save esp to L_SP AS2( lea esp, [ecx-768]) I think I would like to annotate the code and tell Valgrind we are adjusting the stack pointer so we get improved analysis rather than disabling warnings or using some other cannon. I'm trying to avoid --max-stackframe because it may mask a valid finding later. Is it possible to inform Valgrind we are (1) moving the stack pointer for this function/inline asm block; and (2) the stack pointer will be restored when finished with the block? Thanks in advance, Jeff _______________________________________________ Valgrind-users mailing list Valgrind-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/valgrind-users