我相信我已经发现并修复了AUnit中的一个bug,它是Ada的GNAT编译器工具的一部分。
向AdaCore提交GNAT工具的社区版本的bug的最佳方式是什么?
以下程序使用当前版本的编译器GNAT Community 2020 (20200429-84)静默中止
with Ada.Text_IO;use Ada.Text_IO;
with AUnit.Test_Filters;
with AUnit.Tests;
procedure Message_Allocation is
package Filter_Package is
type Filter_Type is new AUnit.Test_Filters.Name_Filter with null record;
function Is_Active
(Filter : Filter_Type;
T : AUnit.Tests.Test'Class) return Boolean;
end Filter_Package;
package body Filter_Package is
function Is_Active
(Filter : Filter_Type;
T : AUnit.Tests.Test'Class) return Boolean is begin return true; end is_active;
end Filter_Package;
filter : Filter_Package.filter_type;
begin
Put_Line ("set 1st filter");
filter.set_name ("abc");
Put_Line ("set 2nd filter");
filter.set_name ("xyz");
Put_Line ("2nd filter set");
end Message_Allocation;该错误存在于aunit.adb文件中的过程Message_Free中。以下是打了补丁的版本。所做的更改是对AUnit.Memory.AUnit_Free调用的参数。
procedure Message_Free (Msg : in out Message_String) is
begin
if Msg /= null then
AUnit.Memory.AUnit_Free (Msg.all'address - System.Address'size/8);
Msg := null;
end if;
end Message_Free;发布于 2020-07-26 21:38:55
A mail to: report (at) (生产蚊虫的公司名称) .com
你可以通过一个有意义的标题和有用的信息来显示错误(通常是复制者示例)和修复程序,从而增加机会。
发布于 2020-07-27 00:03:29
扩展@Zerte answer:还有另外两个选项:
https://github.com/AdaCore/aunit
在我看来,这可能比我的第二个命题更好
https://www.adacore.com/community/contact
根据我自己的经验,你可以在那里很快得到答案。
https://stackoverflow.com/questions/63100046
复制相似问题