On Fri, Jun 5, 2009 at 7:47 PM, Tim Post<[email protected]> wrote:
> Hi,
>
> On Fri, 2009-06-05 at 11:08 +0530, Madhan Sadasivam wrote:
>> Hello,
>>
>> The code below helps to find if we are running on Xen VM and uses
>> "ud2a"
>> http://xen-3.1.sourcearchive.com/documentation/3.1.0/xen-detect_8c-source.html
>>
>> and as expected Valgrind 3.4.1 throws the following warning:
>
> I ran into the same problem. What I ended up doing was along the lines
> of:
>
> #ifndef NDEBUG
> #include <valgrind/valgrind.h>
> #else
> #define RUNNING_ON_VALGRIND 0
> #endif
>
> main()
> {
>   .....
>   if (RUNNING_ON_VALGRIND)
>     signal(SIGILL, dummy_valgrind_handler)
>   else
>     signal(SIGILL, normal_sigill_handler)
>
> Of course that's just a quick example, you probably want to use
> sigaction(). I know its an ugly hack, but it works. I could not figure
> out how to suppress that either.

FWIW, this is in the bug database:

https://bugs.kde.org/show_bug.cgi?id=191062

Nick

------------------------------------------------------------------------------
_______________________________________________
Valgrind-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to