Coder Social home page Coder Social logo

help needed about cr HOT 5 CLOSED

fungos avatar fungos commented on May 23, 2024
help needed

from cr.

Comments (5)

fungos avatar fungos commented on May 23, 2024

Hard to tell, I'll give some shots:

  1. This maybe an issue caused by a problem managing the data sections (.bss or .state). You will need to debug what is happening with your project during the cr_plugin_load_internal (try to put a breakpoint on the returns returning false). I believe it should be failing here but it may very well be another thing.

Also, you can check what changes in your .so after a recompilation by checking its sections (readelf or objdump), this may give some extra information (mostly if offset/address changes).

  1. You say logs tell the library was loaded, so what exactly does not work on your project? Do you see the new .so renamed being used in lsof? (If you lib is foo.so, the loaded object will be like foo0.so, foo1.so, foo2.so, ...). So if you say it works on windows but not on linux, maybe the project output path/name may be the issue.

  2. If you're able to debug and think the old library is loaded, can you validate within GDB the loaded shared objects to make sure the latest version is loaded (info sharedlibrary) ? Also, are you sure a rollback didn't happened trying to load the most recent version of the .so?

from cr.

questor avatar questor commented on May 23, 2024

ufff..... found the issue. your advices did help in the end, I've checked even down to the assembly that the libraries had changed code and that the libraries were reloaded, but the "info sharedlibrary" gave me the hint that I loaded the library in a proper way, but the build system I'm using had a reference to the library as well with the result that I had the original shared library loaded IN ADDITION to the shared libraries loaded by your implementation. and it seems that the reference placed by the linker has a higher priority than the loaded one.

many thanks for the help!!

from cr.

fungos avatar fungos commented on May 23, 2024

Glad to hear you found it.

Is there anything that we should put in the readme about this situation? I mean, if it is something that someone else may find in the future?

from cr.

questor avatar questor commented on May 23, 2024

I also thought about that, the only thing comes in my mind is to write a sentence to NOT link to the dynamically loaded shared library via the build system. the other things like "info sharedlibrary" and "lsof -p " might be useful in a "deepdive debug info" section, but most people should not need that.

from cr.

fungos avatar fungos commented on May 23, 2024

I think it is valid. I'll write something in the FAQ section, thank you for reporting this!

from cr.

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.