Open simonjwright opened 2 years ago
I tried to make a reproducer, but failed: it could always be a compiler error 👎
It is a compiler issue, nothing to do with ada-toml
; alire-vfs.adb
needs to be compiled with optimisation level > 0.
That done I get only one fail, crate_config__basic
:
_Diff:
_--- expected
_
_+++ actual
_
_@@ -1,7 +1,7 @@
_
_ Ada -> Crate_Version: 1.0.0
_ Ada -> Crate_Name: libcrate_config
_ Ada -> Alire_Host_OS: macos
_-Ada -> Alire_Host_Arch: arm64
_+Ada -> Alire_Host_Arch: aarch64
_ Ada -> Alire_Host_Distro: distro_unknown
_ Ada -> Var_Bool: TRUE
_ Ada -> Var_String: 'Test string.'
_@@ -18,7 +18,7 @@
_
_ C -> Crate_Version: 1.0.0
_ C -> Crate_Name: libcrate_config
_ C -> Alire_Host_OS: macos
_-C -> Alire_Host_Arch: arm64
_+C -> Alire_Host_Arch: aarch64
_ C -> Alire_Host_Distro: distro_unknown
_ C -> VAR_BOOL: 1
_ C -> VAR_STRING: 'Test string.'
which should be easy enough to fix.
BTW, -Og
fixes the problem too.
I believe I'm running into the same issue on aarch64 Linux.
Tracing with gdb, this Dynamic_Predicate is calling memset and causing a segfault there.
Removing that predicate fixes pins regardless of optimization level.
On armv8-a, the stack pointer must always be aligned to a 16-bit word (eg. the lowest 4 bits must always be zero). I suspect that somehow the compiler isn't accounting for this.
Adding Alignment => 2
to type Portable_Path
fixes the issue without removing the predicate or changing optimization flags.
@simonjwright that should do the trick -> https://github.com/alire-project/alire/pull/1015
@JeremyGrosser Thanks, but that didn't fix this problem
Having applied this fix to
e3-core
I get the following failures with d34cc53.This appears to be related to pins, particularly link pins, as in this output from
alr update
intrendy_terminal_tests
:(the
path=
).I strongly suspect this is related to this ada-toml issue.
I started to work on fixing up the alire source, but became quite confused about which parts were meant to change queues and which were merely to inspect them, so I'm not going to proceed until I hear from you!
I think we're OK as long as people don't use pins, so newcomers should be unaffected.