File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -11,13 +11,14 @@ internal static class Opcode
1111
1212 public static bool Open ( )
1313 {
14- //Look for an environment variable: "NETQM_SUPPRESS_RDTSC" with a value of "TRUE"
14+ //Look for an environment variable: "NETQM_SUPPRESS_RDTSC" with any value
1515 // The application can set this environment variable when this code is running in a system where
1616 // it is not desirable to read the processor's time stamp counter.
1717 // While this is supported in modern CPUs, the technique used for allocating executable memory, copying OP Code
1818 // for the read of the time stamp and invoking the OP Code can be detected as Malware by some anti-virus vendors.
19- var val = Environment . GetEnvironmentVariable ( "NETQM_SUPPRESS_RDTSC" ) ;
20- if ( "TRUE" . Equals ( val , StringComparison . OrdinalIgnoreCase ) )
19+ // https://github.com/zeromq/netmq/issues/1071
20+ string val = Environment . GetEnvironmentVariable ( "NETQM_SUPPRESS_RDTSC" ) ;
21+ if ( ! string . IsNullOrEmpty ( val ) )
2122 return false ;
2223#if NETSTANDARD1_1_OR_GREATER || NET471_OR_GREATER
2324 if ( RuntimeInformation . ProcessArchitecture != Architecture . X86 &&
You can’t perform that action at this time.
0 commit comments