Giter Site home page Giter Site logo

Comments (4)

dsikich avatar dsikich commented on August 22, 2024

@nedbass Stat was one of the functions that can potentially have multiple names. It is stat at the application level, but could really be calling like __xstat or __lxstat in reality. I believe in this case there is a macro in glibc header files that defines stat as __xstat. LD_PRELOAD will also suffer from this issue, but gotcha lets you know when that name failed to be wrapped successfully.

We talked a while back about making sure that there was at least one function for that call wrapped successfully. So, if one of (__lxstat, __xstat, or stat) was successfully wrapped should we leave out this error? If we add this, then that feature would only be usable with gotcha (or you were checking at runtime which functions gotcha did successfully wrap?) I'm not sure. The other thing I am not sure about is if these names may depend on the version of glibc used?

For now, maybe allowing which functions failed to be wrapped is confusing until we add that functionality?

from unifyfs.

nedbass avatar nedbass commented on August 22, 2024

My feeling is that it's best practice for libraries to avoid printing anything to the console. Or at the very least only under exceptional or fatal conditions. A good design might be to provide a way for the unifycr library to return success/failure information to the application in some way, so the application could decide how to handle it. A simpler approach might be to be silent by default, but provide a way to enable a debug or verbose mode that would print the messages. e.g. setting UNIFYCR_VERBOSE=n where increasing values of n provide more info.

from unifyfs.

dsikich avatar dsikich commented on August 22, 2024

@nedbass Okay, thanks. I can add the simpler silent mode sometime today or tomorrow, and I think that will avoid the confusion until we add more.

from unifyfs.

dsikich avatar dsikich commented on August 22, 2024

closing this since gotcha no longer prints these when debug is off

from unifyfs.

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.