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

Create_Context crashes on windows since GNAT native 12.1.2 #949

Open
pjljvandelaar opened this issue Sep 2, 2022 · 3 comments
Open

Create_Context crashes on windows since GNAT native 12.1.2 #949

pjljvandelaar opened this issue Sep 2, 2022 · 3 comments
Labels

Comments

@pjljvandelaar
Copy link

Dear Libadalang developers,

Recently, GNAT native 12.1.2 was released in the Alire ecosystem.
Unfortunately, this resulted in crashes in all my crates on the windows platform.

I have been able to pinpoint the problem in the attached reproducer.
bug_native12.zip

When typing
alr run
I would expect the output

Start
Done

However, as you will see one gets

Start

Could you please fix the bug?
Furthermore, could you release a new version of libadalang for the Alire ecosystem that works with GNAT native 12.1.2?

Thanks in advance,

Pierre van de Laar

@thvnx
Copy link
Contributor

thvnx commented Sep 6, 2022

Hi Pierre,

Thank you for the report. We'll have a look.

Laurent

@thvnx thvnx added the bug label Sep 6, 2022
@pjljvandelaar
Copy link
Author

I have been able to pinpoint it a little more precise:
Libadalang.Internal_Default_Provider.Create

Still don't understand what causes the problem...
Have even experienced it on GNAT 11.2.4 - unclear whether installing 12.1.2 is already enough to trigger the bug
or it is a improvement of windows.

@pjljvandelaar
Copy link
Author

pjljvandelaar commented Sep 21, 2022

I still have a lot of problems due to this bug.
I have been able to pinpoint it even further: gnatcoll-projects.adb calls Non_Blocking_Spawn (in GNAT.EXPECT [g-expect.adb])
on line 8307 with
C:\Users\laarpjljvd\.config\alire\cache\dependencies\gnat_native_11.2.4_2f9c5d6d\bin\gnatls.exe
that fails.

Which is really strange since

PS C:\path\to\bug_native12> alr printenv --powershell | Invoke-Expression
PS C:\path\to\bug_native12> C:\Users\laarpjljvd\.config\alire\cache\dependencies\gnat_native_11.2.4_2f9c5d6d\bin\gnatls.exe -v

nicely yields

GNATLS 11.2.0
Copyright (C) 1997-2021, Free Software Foundation, Inc.

Source Search Path:
   <Current_Directory>
   C:\Users\laarpjljvd\.config\alire\cache\dependencies\gnat_native_11.2.4_2f9c5d6d\lib\gcc\x86_64-w64-mingw32\11.2.0\adainclude


Object Search Path:
   <Current_Directory>
   C:\Users\laarpjljvd\.config\alire\cache\dependencies\gnat_native_11.2.4_2f9c5d6d\lib\gcc\x86_64-w64-mingw32\11.2.0\adalib


Project Search Path:
   <Current_Directory>
   C:\Users\laarpjljvd\.config\alire\cache\dependencies\gnat_native_11.2.4_2f9c5d6d
   C:\Users\laarpjljvd\.config\alire\cache\dependencies\gprbuild_22.0.1_c842bbc5
   C:\path\to\bug_native12
   C:\path\to\bug_native12\alire\cache\dependencies\gnatcoll_22.0.0_620c2f23
   C:\path\to\bug_native12\alire\cache\dependencies\gnatcoll_gmp_22.0.0_f3732e5d\gmp
   C:\path\to\bug_native12\alire\cache\dependencies\gnatcoll_iconv_22.0.0_f3732e5d\iconv
   C:\path\to\bug_native12\alire\cache\dependencies\langkit_support_22.0.0_d43df3a9
   C:\path\to\bug_native12\alire\cache\dependencies\libadalang_22.0.0_5f365aa4
   C:\path\to\bug_native12\alire\cache\dependencies\libgpr_22.0.0_30e39dcc\gpr
   C:\path\to\bug_native12\alire\cache\dependencies\xmlada_22.0.0_b322ae27\distrib
   C:\path\to\bug_native12\alire\cache\dependencies\xmlada_22.0.0_b322ae27\dom
   C:\path\to\bug_native12\alire\cache\dependencies\xmlada_22.0.0_b322ae27\input_sources
   C:\path\to\bug_native12\alire\cache\dependencies\xmlada_22.0.0_b322ae27\sax
   C:\path\to\bug_native12\alire\cache\dependencies\xmlada_22.0.0_b322ae27\schema
   C:\path\to\bug_native12\alire\cache\dependencies\xmlada_22.0.0_b322ae27\unicode
   C:\Users\laarpjljvd\.config\alire\cache\dependencies\gnat_native_11.2.4_2f9c5d6d\x86_64-w64-mingw32\lib\gnat
   C:\Users\laarpjljvd\.config\alire\cache\dependencies\gnat_native_11.2.4_2f9c5d6d\x86_64-w64-mingw32\share\gpr
   C:\Users\laarpjljvd\.config\alire\cache\dependencies\gnat_native_11.2.4_2f9c5d6d\share\gpr
   C:\Users\laarpjljvd\.config\alire\cache\dependencies\gnat_native_11.2.4_2f9c5d6d\lib\gnat

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants