-
Notifications
You must be signed in to change notification settings - Fork 21
error in Tokenizer.cpp:99 #51
Comments
AFAIK this happens when comment has length of 2, i.e. nothing goes after // I have a sample file to reproduce this issue. But this assert is commented in the source version, so I think binaries should be updated |
I couldn't replicate in my fork - added empty comments to the test suite - 8ffd893. Please provide minimal working example here or as a new ticket on mine. |
@lengocthuong15 please try my fork at https://github.com/AaronDMarasco/FlintPlusPlus - this fork has been untouched for about six years now. I've added RPM, DEB, Docker, etc too. I have a file that specifically doesn't have a newline at the end (within a comment) as part of the test suite - https://github.com/AaronDMarasco/FlintPlusPlus/blob/master/flint/tests/Comments.cpp Original:
I tried to emulate your problem and it passed all checks:
|
Thank @AaronDMarasco |
Running flint++ from master (c04020e) on my own code results in
flint++: Tokenizer.cpp:99: std::string flint::{anonymous}::munchSingleLineComment(std::string&, size_t&): Assertion `i < pc.size()' failed.
Program received signal SIGABRT, Aborted.
0x00007ffff75390d5 in __GI_raise (sig=) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
64 ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0 0x00007ffff75390d5 in __GI_raise (sig=) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#1 0x00007ffff753c83b in __GI_abort () at abort.c:91
#2 0x00007ffff7531d9e in __assert_fail_base (fmt=, assertion=0x422b70 "i < pc.size()", file=0x4224ea "Tokenizer.cpp", line=, function=) at assert.c:94
#3 0x00007ffff7531e42 in __GI___assert_fail (assertion=0x422b70 "i < pc.size()", file=0x4224ea "Tokenizer.cpp", line=99,
#4 0x000000000041f7be in flint::tokenize(std::string const&, std::string const&, std::vector<flint::Token, std::allocatorflint::Token >&) ()
#5 0x0000000000413b2c in checkEntry(flint::ErrorReport&, std::string const&, unsigned int) ()
#6 0x00000000004140f6 in checkEntry(flint::ErrorReport&, std::string const&, unsigned int) ()
#7 0x00000000004140f6 in checkEntry(flint::ErrorReport&, std::string const&, unsigned int) ()
#8 0x0000000000402f7e in main ()
The text was updated successfully, but these errors were encountered: