> vex amd64->IR: unhandled instruction bytes: 0xFA 0x89 0xF8 0xF 0xA2 0xF

> ==12793==  Illegal opcode at address 0xC8EEBDD
> ==12793==    at 0xC8EEBDD: cpu_calibrate (cpu-x86.h:61)

> Line 61 is asm volatile ("cli") in the following function:
> 
> static inline void __cpu_lock(void)
> {
>    if (_cpu_caps & (1 << CPU_CAPS_IRQ_LOCK))
>       asm volatile ("cli");
> }.

The "cli" instruction turns off the interrupt enable bit of the hardware.
This is for use by the operating system only.  It makes no sense at all
in a user-mode program.  The immediate work-around is to replace __cpu_lock
[and presumably __cpu_unlock, also] with an empty function which does nothing:
   static inline void __cpu_lock(void)
   {
      /* empty */
   }
If the logic of the application depends on cli and sti, then the logic
is incorrect.

-- 

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Valgrind-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to