TNO / Rewriters-Ada

Advanced manipulation of Ada code
BSD 3-Clause "New" or "Revised" License
5 stars 1 forks source link

Premature termination #1

Open pjljvandelaar opened 2 years ago

pjljvandelaar commented 2 years ago

This issue was found while code reviewing for json-ada. json-ada is an open source project, is available at https://github.com/onox/json-ada, and uses alire (see https://alire.ada.dev/) to build.

The problem is with analysis of https://github.com/onox/json-ada/blob/d429d7af880ab9ed38d58ac08c1c9a16e7697752/json/src/json-types.adb#L157-L160

==== Boolean_If_Else_False_Expression ====
--- C:\path\to\json-ada\json\src\json-types.adb ---
Before P_Expression_Type - json-types.adb:157:7:
C:> 
pjljvandelaar commented 2 years ago

The problem seems to be cause by libadalang's P_Expression_Type. I was able to make a reproducer and submitted an issue at AdaCore. So we are blocked until libadalang solves this issue.

Note, the reproducer however throws a stack overflow exception while the original issue doesn't! So we still have to investigate why the exception is not thrown, or not printed by our own exception handling (what SHOULD happen).