Code Monkey home page Code Monkey logo

securitydriven.core's People

Contributors

sdrapkin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

securitydriven.core's Issues

Environment.ProcessorCount will change in .NET 6

Hi,

I find your implementation of per-thread caching clever and interesting. I think there is a pathological edge case in .NET 5 and earlier and a more likely edge case in .NET 6 that will cause a problem, however.

.NET 6 changes Environment.ProcessorCount to return a number less than the number of processors in two cases:

  • If the process is running with CPU affinity, the number of processors that the process is affinitized to.
  • If the process is running with a CPU utilization limit, the CPU utilization limit rounded up to the next whole number.

In this case I believe Thread.GetCurrentProcessorId can return a number greater than Environment.ProcessorCount (especially in the case that the process affinity is set to, say, the seventh and eight CPU cores).

In all versions of .NET "The value returned by this API is fixed at .NET runtime startup for the process lifetime" and in certain virtualisation environments support hot add vCPU so more processors could be added after the application starts.

In any case, if either of the above situations transpires then this line will throw an IndexOutOfRangeException.

Please note I do not have .NET 6 or virtualization software with hot add vCPU on hand, so I apologise if this is a hypothetical. The breaking change documentation for .NET 6 is here and it suggests this might already be a problem when running on Unix-based hosts.

Error when building SecurityDriven.Core

Cloned the repo and tried to build in Visual Studio but I get the following error:

"Error signing output with public key from file 'Inferno.snk' -- File not found."

image

I'm not sure how to go about fixing this since I haven't used the AssemblyOriginatorKeyFile property before. Any help is appreciated!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.