/Qspectre-jmp

Causes the compiler to generate an int3 instruction (software interrupt) after unconditional direct branches. This option extends the /Qspectre flag and mitigates speculative execution side-channel attacks on unconditional direct branches.

Syntax

/Qspectre-jmp

Remarks

/Qspectre-jmp causes the compiler to detect executable instructions following unconditional direct branches. An int3 is inserted following unconditional direct branches to ensure that no instructions are speculatively executed beyond the branch. For example, the compiler mitigates jmp addr by adding an int3 instruction following the jmp instruction as shown here:

jmp addr
int3

/Qspectre-jmp is off by default. It's supported for all optimization levels.

Set this compiler option programmatically

To set this option programmatically, see VCCLCompilerTool.AdditionalOptions property.

See also

/Qspectre
/Qspectre-jmp
/Qspectre-load
/Qspectre-load-cf
/Q options (Low-Level Operations)
MSVC compiler options
MSVC compiler command-line syntax