首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >GNAT附带的AUnit中的错误

GNAT附带的AUnit中的错误
EN

Stack Overflow用户
提问于 2020-07-26 20:20:47
回答 2查看 97关注 0票数 2

我相信我已经发现并修复了AUnit中的一个bug,它是Ada的GNAT编译器工具的一部分。

向AdaCore提交GNAT工具的社区版本的bug的最佳方式是什么?

以下程序使用当前版本的编译器GNAT Community 2020 (20200429-84)静默中止

代码语言:javascript
复制
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调用的参数。

代码语言:javascript
复制
   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;
EN

回答 2

Stack Overflow用户

发布于 2020-07-26 21:38:55

A mail to: report (at) (生产蚊虫的公司名称) .com

你可以通过一个有意义的标题和有用的信息来显示错误(通常是复制者示例)和修复程序,从而增加机会。

票数 2
EN

Stack Overflow用户

发布于 2020-07-27 00:03:29

扩展@Zerte answer:还有另外两个选项:

  1. 您可以在Github上的公共AUnit存储库报告错误,提出拉取请求:

https://github.com/AdaCore/aunit

在我看来,这可能比我的第二个命题更好

  1. 您可以在以下位置使用社区版AdaCore软件的联系web表单:

https://www.adacore.com/community/contact

根据我自己的经验,你可以在那里很快得到答案。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/63100046

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档