fix: corrupted list in tests#2079
Merged
mosteo merged 5 commits intoalire-project:masterfrom Feb 18, 2026
Merged
Conversation
1c49cc5 to
b6a9e8c
Compare
8a33e6c to
e64d524
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request fixes a "corrupted double-linked list" bug that occurs during testing with gcc 13. The bug manifests as a heap corruption error when executing alr with --del remote in the git-reference test. The fix addresses this by refactoring how Ada reserved keywords are stored and checked.
Changes:
- Refactored reserved keywords storage from a compile-time constant array to a runtime lazily-initialized heap-allocated structure
- Added gcc version detection and test skip logic to avoid triggering the known bug on gcc 13
- Created a new
Alire.Reservedpackage to encapsulate the keyword checking logic
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| testsuite/tests/with/git-reference/test.py | Adds gcc version detection to skip test on gcc 13 where the bug occurs |
| src/alire/alire.ads | Removes the large constant array of reserved keywords from the private section |
| src/alire/alire.adb | Updates keyword checking to use the new Reserved.Is_Keyword function |
| src/alire/alire-reserved.ads | New package specification declaring the Is_Keyword function |
| src/alire/alire-reserved.adb | New package body implementing lazy initialization of reserved keywords array |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.