Giter Club home page Giter Club logo

Comments (9)

kpgriesser avatar kpgriesser commented on August 14, 2024

Additional comment: This reproducer fails when the args are not used so the use case is uninteresting and probably should be low priority. However, the original failure was a complex bit of code where adding 1 instruction to an inline assembly function would cause a crash but only on mem-hierarchy model. I think that is probably a separate problem related to dependencies for compact instructions.

Bottom line, I don't think it's worth spending too much time on this case unless I have a more interesting reproducer that shows the original sensitivity I was seeing. I just wanted to make sure this was documented in case others run into problems with command line arguments.

from rev.

kpgriesser avatar kpgriesser commented on August 14, 2024

This issue is becoming higher priority. I'm not sure if the problem is the args or the atoi function misbehaving.

from rev.

jleidel avatar jleidel commented on August 14, 2024

Is this C or CXX?

from rev.

kpgriesser avatar kpgriesser commented on August 14, 2024

It is CXX. The source suffix should be changed to .cc.

from rev.

jleidel avatar jleidel commented on August 14, 2024

ok, perfect. I think we can relegate this to being CXX only.

from rev.

kpgriesser avatar kpgriesser commented on August 14, 2024

Looking more like a memory corruption issue. In updown-accel/ud-sys-devel I have a more robust workaround by providing a system call that gives back each argv from the internally stored vector. If this would be helpful in the main rev repo I can create a PR for it.
Usage:
int argv1 = rev::atoi_argv(1);
int argv2 = rev::atoi_argv(2);
int argv3 = rev::atoi_argv(3);

from rev.

kpgriesser avatar kpgriesser commented on August 14, 2024

I added more checks in the test and provided an annotated trace that shows where argv[2][0] is referenced to check it's initial char value and where the reference is clobbered in the atoi code. Subsequent usage of the value referenced leads to the crash. See argc_bug.trace_annotated. Search for '###' for comments and '!!!' for errant behavior. This was run using macOS but the Ubuntu run is similar.

from rev.

kpgriesser avatar kpgriesser commented on August 14, 2024

Verified PR #288 fixes this bug. Will close when PR is approved and merged into devel branch

from rev.

kpgriesser avatar kpgriesser commented on August 14, 2024

confirmed

from rev.

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.