Comments (9)
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.
This issue is becoming higher priority. I'm not sure if the problem is the args or the atoi function misbehaving.
from rev.
Is this C or CXX?
from rev.
It is CXX. The source suffix should be changed to .cc.
from rev.
ok, perfect. I think we can relegate this to being CXX only.
from rev.
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.
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.
Verified PR #288 fixes this bug. Will close when PR is approved and merged into devel branch
from rev.
confirmed
from rev.
Related Issues (20)
- simple constructor crash HOT 4
- missing thread execution for RV32I HOT 1
- Make spikeCheck modular based on the startSymbol passed in the rev config
- Statistics not being correctly accumulated or reported HOT 2
- fcvt.w.s does not support rounding modes HOT 8
- [FEATURE REQUEST] ifence HOT 1
- [FEATURE REQUEST] Support cache flush instructions HOT 1
- A problem with FPU register dependency tracking HOT 12
- Out of Memory error when using rev_mmap (with the memH memory backend) HOT 2
- c.addi16sp instruction is incorrectly printed as c.lui by Rev Tracer HOT 1
- Tracer is printing compressed register move instructions as c.jr instructions HOT 3
- [FEATURE REQUEST] Documentation HOT 3
- rev_read operation slowdown after large number of lines read HOT 2
- Stack buffer initialization corrupts memory. HOT 22
- lwsp instruction execution generating bad address outside of stack HOT 3
- dump_stack() system call returning only zeros
- [FEATURE REQUEST] Different testing levels HOT 4
- [FEATURE REQUEST] CSR Tracing
- [FEATURE REQUEST] Support signal and trap handling
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rev.