GithubHelp home page GithubHelp logo

Comments (3)

msteveb avatar msteveb commented on June 16, 2024

I'm not inclined to implement this. It's a run time, not a compile time cost that is incurred by everyone for a very, very small number of potential situations. That's like running ubsan every time, instead of only during testing. What do you want to do in undefined behaviour cases? Throw an error? Perhaps it could be a configurable compile time option, but someone else will need to implement it. Perhaps some of the simpler cases are easy enough like shifting by a negative number, overflow checking of addition, multiplication and negation seem harder

from jimtcl.

aap-sc avatar aap-sc commented on June 16, 2024

I'm not inclined to implement this.

I see. That's understandable.

What do you want to do in undefined behaviour cases? Throw an error?

Well, yeah.. That was an idea I had in mind.

Perhaps it could be a configurable compile time option, but someone else will need to implement it. Perhaps some of the simpler cases are easy enough

So basically you are not against patches that may address this right?

Perhaps some of the simpler cases are easy enough like shifting by a negative number,

I personally interested in improving this in context of OpenOCD tasks. For example it seems reasonable that operations like 1 << 63 to behave without ubsan reporting a potential UB. I can try to provide patches for the detected "simple" cases, if there is no strong push back.

from jimtcl.

msteveb avatar msteveb commented on June 16, 2024

Yes, completely open to patches that are not detrimental (e.g. performance) to most users, or if so, then it is a configuration-time setting that can be turned off as required.

from jimtcl.

Related Issues (20)

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.