thomasrussellmurphy / istyle-verilog-formatter

Open source implementation of a Verilog formatter
GNU General Public License v2.0
173 stars 44 forks source link

Formatting any Verilog file gives "Assertion '__pos <= size()' failed" #8

Closed IsaacJT closed 4 years ago

IsaacJT commented 5 years ago

Hello, I am using Fedora 29 and running the utility on any Verilog file gives the following output:

iStyle 1.21 (Fast and Free Automatic Formatter for Verilog Source Code)
               (Created by haimag, Report Bugs: haimag@gmail.com)
               (Thanks to Tal Davidson & Astyle)

/builddir/build/BUILD/gcc-8.2.1-20181215/obj-x86_64-redhat-linux/x86_64-redhat-linux/libstdc++-v3/include/bits/basic_string.h:1067: std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::reference std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator[](std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::reference = char&; std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type = long unsigned int]: Assertion '__pos <= size()' failed.                
zsh: abort (core dumped)  iStyle nzfe_tb.v

The .orig file is created, but the file to be formatted is truncated down to only a couple of lines.

lassik commented 4 years ago

The .orig file is created, but the file to be formatted is truncated down to only a couple of lines.

The output file is probably truncated because the failing assert shuts down program while it is still formatting it.

Your printout says (core dumped); are you still able to reproduce the bug and get a core file? If you can get into GDB (GNU debugger) to get a backtrace it would be really helpful. (The command to do that in the GDB console is simply backtrace and it prints it to your terminal.)

thomasrussellmurphy commented 4 years ago

No further feedback given; closing.