Giter Club home page Giter Club logo

Comments (3)

dneto0 avatar dneto0 commented on July 24, 2024

The reliance on the failure from istringstream is used to check for out-of-bounds arguments to things like OpConstant %type , where %type is a known type.
For example if %type is an unsigned 32-bit int, then the istringstream::fail() is used to see if the value is out of bounds for that type.
In short, this is behaviour we do want to rely on, so that the assembler can properly check its inputs.

This looks like a bug in the Apple C++ library.
Behaviour is as specified in http://en.cppreference.com/w/cpp/io/basic_istream/operator_gtgt
In particular "f extraction fails, zero is written to value and failbit is set. If extraction results in the value too large or too small to fit in value, std::numeric_limits::max() or std::numeric_limits::min() is written and failbit flag is set."

Well, we've already worked around a GNU libc++ bug. We seem to have an Apple one.

Thanks for reporting this.

from spirv-tools.

dneto0 avatar dneto0 commented on July 24, 2024

I investigated two test failures which occur on Mac OSX using Apple's Clang.

There are two failing essential cases:

  1. parsing "-0" is expected to succeed with value 0 even for unsigned target types.
  2. parsing a too-large floating point value in regular notation (e.g. 1.0e400) is expected to result in an error, but it does not.

from spirv-tools.

dneto0 avatar dneto0 commented on July 24, 2024

Fixed in master with 6bad02c

from spirv-tools.

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.