Coder Social home page Coder Social logo

Comments (3)

gboisse avatar gboisse commented on August 18, 2024

Thanks for taking the time to report, the program name in this case gets truncated, so there should be no overflow/crash.

An object's name (for programs, kernels, textures, etc.) is only used for making debugging easier, so resources can be easily identified like, for instance, in a Pix capture.

Under the hood, the full file path is being stored in a regular string so there is no risk of the information getting lost:
https://github.com/gboisse/gfx/blob/f06e3f2408db8e998203ab22c553ee58b4954eec/gfx.h#L1077-L1078

from capsaicin.

Hineven avatar Hineven commented on August 18, 2024

Yes, I missed the real cause of the crash...
Seemingly the crash is caused by a problem of the gfx library. While compiling shaders, dxc_utils_->LoadFile does not set a '\0' value at the end of the shader source string indicating the termination of the source (it returns a length of the shader code instead). However, in the later dxc_compiler_->Compile function call gfx has not specified the true size of shader source code. Eventually when the shader source code string is not zero initialized the program crashes by chance.

from capsaicin.

Hineven avatar Hineven commented on August 18, 2024

Yes, I missed the real cause of the crash... Seemingly the crash is caused by a problem of the gfx library. While compiling shaders, dxc_utils_->LoadFile does not set a '\0' value at the end of the shader source string indicating the termination of the source (it returns a length of the shader code instead). However, in the later dxc_compiler_->Compile function call gfx has not specified the true size of shader source code. Eventually when the shader source code string is not zero initialized the program crashes by chance.

oops, seems that's still not the cause. The shader source size is passed in correctly... Anyway there are chances the program crashes every time compiling the shaders on my computer. Mysterious.

from capsaicin.

Related Issues (19)

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.