Skip to content

Has trouble with international (UTF) source #1221

Open
@simonjwright

Description

@simonjwright

Running this utf-8 file in ALS (Alire release 25.0.0) under Emacs ada-ts-mode

with ada.text_io; use ada.text_io;
procedure utf is
   à_variable : integer := 42;
begin
   put_line ("À_variable: " & à_variable'image);
end utf;

I get this message:

Error running timer: (error "utf.adb:1:1: Error formatting node (CompilationUnit). Keeping the initial input selection unchanged
pp-formatting.adb:1264")

Running in VSCode, it fails - the log file says

[ALS.MAIN] in GNATformat Format
[ALS.MAIN] raised CONSTRAINT_ERROR : erroneous memory access
_ALS.MAIN_ 0x0000000108647D68 0x0000000108647DA0 0x00000001086EA6AC 0x00000001086EB5F4 0x00000001079292C5 0x0000000107936C5C 0x000000010788C0A0 0x000000010783C29C 0x00000001077DB52C 0x0000000107803844 0x0000000107802DE8 0x0000000107803058 0x0000000107803C0C 0x0000000107803BB8 0x0000000107803240 0x0000000107803854 0x0000000107803884 0x0000000107802DE8 0x0000000107804F8C 0x00000001077996E8 0x00000001063BD344 0x00000001063BD620 0x00000001062AFBC8 0x00000001062962DC 0x000000010634930C 0x000000010633D33C 0x000000010532074C 0x000000010532D25C 0x000000010630A53C 0x0000000108631980 0x00000001951972E0

The stack trace occurs twice. I may be able to decode it, but it’ll be much easier if you do it, and will make more sense! (see this gnatformat issue).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions