Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

index out of bounds: the len is 10 but the index is 10 #17

Open
KisaragiEffective opened this issue Sep 20, 2022 · 2 comments
Open

index out of bounds: the len is 10 but the index is 10 #17

KisaragiEffective opened this issue Sep 20, 2022 · 2 comments

Comments

@KisaragiEffective
Copy link

C++ code

// /tmp/test1.cc
struct simple {
	const char* hi;
};

int main(void) {
}

C++ compiler output

g++

$ rm ./a.out; g++ --version; g++ /tmp/test1.cc && ./a.out; echo $?
g++ (Debian 10.2.1-6) 10.2.1 20210110
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

0

clang++

$ rm ./a.out; clang++ --version; clang++ /tmp/test1.cc && ./a.out; echo $?
Debian clang version 11.0.1-2
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
0

Error

$ crust --strict /tmp/test1.cc
Input file size : 138bytes 
TokenizingInvoking Parser....
thread 'main' panicked at 'index out of bounds: the len is 10 but the index is 10', src/library/parser/parser.rs:1700:19
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
@NishanthSpShetty
Copy link
Owner

I haven't worked on in a long time, the parser I designed is pretty much unknown to me at this moment to dive right away. So been procrastinating on it on whether or not restart the work again.
Feel free to make any changes and work on it by yourself. I hope to find the strength and motivation to work on it soon.
Thanks.

@KisaragiEffective
Copy link
Author

KisaragiEffective commented Sep 20, 2022

sure, maybe send some PRs in the future ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants