Deutsch   English   Français   Italiano  
<ugpcnq$5gr$3@rasp.pasdenom.info>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!weretis.net!feeder8.news.weretis.net!pasdenom.info!.POSTED.2a01:e0a:472:70f0:e068:a2b4:279b:fe6b!not-for-mail
From: DrPi <314@drpi.fr>
Newsgroups: fr.comp.lang.ada
Subject: Re: Crash de Start_Search
Date: Wed, 18 Oct 2023 21:47:02 +0200
Organization: <https://pasdenom.info/news.html>
Message-ID: <ugpcnq$5gr$3@rasp.pasdenom.info>
References: <ugka3k$j29$1@rasp.pasdenom.info>
 <ugkaad$j29$2@rasp.pasdenom.info> <ugle17$v3c$1@rasp.pasdenom.info>
 <ugpam8$3qi6s$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 18 Oct 2023 19:47:06 -0000 (UTC)
Injection-Info: rasp.pasdenom.info; posting-account="314@usenet"; posting-host="2a01:e0a:472:70f0:e068:a2b4:279b:fe6b";
	logging-data="5659"; mail-complaints-to="abuse@pasdenom.info"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha256:zAcbxHK6hL1D75fiW3Xsaao88nlTE2Ho/XZhk9qA3so=
Content-Language: fr
In-Reply-To: <ugpam8$3qi6s$1@dont-email.me>
Bytes: 2810
Lines: 54

Le 18/10/2023 à 21:12, Blady a écrit :

>> Ce qui m'étonne, c'est que le crash se produit dans la fonction 
>> Dir_Search, fonction de la runtime.
>> Apparemment, plus préciément, dans le calcul d'une date 
>> (Ada.Calendar.Arithmetic_Operations.Add).
>>
>> C'est étrange et je ne vois pas comment remédier à ce problème. Il n'y 
>> a rien à ce sujet ici : 
>> http://www.ada-auth.org/standards/rm12_w_tc1/html/RM-A-16.html
> 
> Bonjour Nicolas,

Bonjour Pascal,

> 
> J'ai testé sur macOS ça tourne :
> 
> % ./bin/test_20231018_dir_search
> Test en cours...
> Found : .
> Found : ..
> Found : Test avec entête.txt
> 
> 
> Le code concerné est :
> 
>           C_Name := Name & ASCII.NUL;
>           Date := C_Modification_Time (C_Name'Address);
> 
>           if Date = Invalid_Time then
>              raise Use_Error with
>                "Unable to get modification time of the file """ & Name & 
> '"';
>           end if;
> 
> Je suspecte la fonction C_Modification_Time avec des caractères 
> accentués ayant un code différent entre Linux / macOS / Windows, ce qui 
> est souvent le cas pour ces fonctions codées en C :
> 
>     function C_Modification_Time (N : System.Address) return 
> Ada.Calendar.Time;
>     pragma Import (C, C_Modification_Time, "__gnat_file_time");
> 
> Il faudrait aller voir dans le code C de __gnat_file_time.
> Sinon tu peux toujours poster un rapport d'anomalie sur 
> https://gcc.gnu.org/bugzilla.

Je n'ai pas encore pris le temps de regarder dans le détail.
Tes informations me seront bien utiles.
Je pense qu'un rapport de bug sera nécessaire. A confirmer.

Merci

Nicolas