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

gprbuild V22.0.0 creates backtrace on incorrect input instead of error message #116

Open
RREE opened this issue Aug 22, 2022 · 4 comments
Open

Comments

@RREE
Copy link

RREE commented Aug 22, 2022

calling gprbuild on the attached gpr-files creates a backtrace. Expand bug.tar.gz and go into AVRAda_Examples:

 ~/.config/alire/cache/dependencies/gprbuild_22.0.1_24dfc1b5/bin/gprbuild -s -j0 -p -P 7seg/seven_segment_disp.gpr
gprbuild: raised SYSTEM.ASSERTIONS.ASSERT_FAILURE : Invalid Id 0
[/home/re/.config/alire/cache/dependencies/gprbuild_22.0.1_24dfc1b5/bin/gprbuild]
0x8aab60 system__assertions__raise_assert_failure at ???
0x677161 gpr__names__get_name_string__5 at ???
0x5bfc61 gpr__conf__get_element_or_empty at ???
0x5c811f gpr__conf__get_or_create_configuration_file at ???
0x5c9d5b gpr__conf__process_project_and_apply_config at ???
0x5ca5d2 gpr__conf__parse_project_and_apply_config at ???
0x4a0430 _ada_gprbuild__main at ???
0x490bc4 main at ???
[/lib/x86_64-linux-gnu/libc.so.6]
0x7fdf8e6f9d08
[/home/re/.config/alire/cache/dependencies/gprbuild_22.0.1_24dfc1b5/bin/gprbuild]
0x490c18 _start at ???
0xfffffffffffffffe

gprbuild 18.0w (standard Debian version) gives a friendlier message, but still not very helpful:

gprbuild -s -j0 -p -P 7seg/seven_segment_disp.gpr
gprbuild: raised CONSTRAINT_ERROR : gpr-names.adb:231 range check failed
@t-14
Copy link
Contributor

t-14 commented Aug 22, 2022

The crash is of course not expected, but the project is illegal: for Runtime ("Ada") use Avrada_Rts.Runtime; - there is no variable Runtime defined in Avrada_Rts. Probably what was intended is an attribute reference, something like for Runtime use Avrada_Rts'Runtime;

(edit: the crash is due to an import of a missing file "mcu.gpr")

@RREE
Copy link
Author

RREE commented Aug 22, 2022

Yes, the intend was to use an attribure reference. But a simple misunderstanding or typing error (. <--> ') or (as you have already found, thanks) a missing with should not cause a crash. That's why the issue title contains "... on incorrect input ...".

BTW, the file mcu.gpr is present in my case. I probably missed to send it in the bug report.

@t-14
Copy link
Contributor

t-14 commented Aug 22, 2022

(edit - never mind, I got my wires crossed)

@GuillermoHazebrouck
Copy link

For the records, I get the same error when calling --show-targets:

$ gprconfig --show-targets
raised CONSTRAINT_ERROR : gpr-names.adb:231 range check failed

on this gprbuild version:

$ gprbuild --version
GPRBUILD Pro 18.0w (19940713) (x86_64-linux-gnu)
Copyright (C) 2004-2016, AdaCore
This is free software; see the source for copying conditions.
See your AdaCore support agreement for details of warranty and support.
If you do not have a current support agreement, then there is absolutely
no warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.

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

3 participants