AdaCore / libadalang-tools

Libadalang-based tools
GNU General Public License v3.0
16 stars 13 forks source link

gnatpp: Constraint error when excludes file contains more lines than input files #8

Open LordAro opened 4 years ago

LordAro commented 4 years ago

With test_excludes.txt as

afile.adb
bfile.adb

gnatpp --ignore=test_excludes.txt foobar.adb results in:

Unhandled Exception raised
raised CONSTRAINT_ERROR : utils-drivers.adb:120 range check failed
[/home/cpigott/dev/libadalang-tools/bin/gnatpp]
Utils.Drivers.Driver.Process_Files at utils-drivers.adb:120
Utils.Drivers.Driver at utils-drivers.adb:220
Pp.Main at pp-main.adb:20
Main at b__pp-main.adb:1706
[/lib/x86_64-linux-gnu/libc.so.6]
0x7f12a01b7b95
[/home/cpigott/dev/libadalang-tools/bin/gnatpp]
0x407d78 _start at ???
0xfffffffffffffffe

I also managed to trigger the debug assert on line 124, but I can't find a minimal reproducer for that at the moment

andrewathalye commented 11 months ago

This is still reproducible under the same conditions.