[m-users.] aarch64 runtime reports "caught segmentation violation"

Van Ly van.ly at sdf.org
Tue May 17 22:21:14 AEST 2022


Hello,

The aarch64 Mercury runtime on Rpi 4B 8GB is unable to run a
"hello world" example.  Any ideas on how to proceed?  Details follow.

```

$ uname -a
Linux charlie 5.15.32-v8+ #1538 SMP PREEMPT Thu Mar 31 19:40:39 BST 
2022 aarch64 GNU/Linux

$ cc --version
cc (Debian 10.2.1-6) 10.2.1 20210110
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ ./configure --prefix=/usr/X/Applications/mercury --with-cc=gcc --disable-csharp-grade --disable-java-grade --enable-minimal-install --enable-nogc-grades

$ make
$ make install

$ mmc --version
Mercury Compiler, version 22.01.1, on aarch64-unknown-linux-gnu
Copyright (C) 1993-2012 The University of Melbourne
Copyright (C) 2013-2022 The Mercury team

$ nl hello.m
      1	:- module hello.

      2	:- interface.
      3	:- import_module io.
      4	:- pred main(io, io).
      5	:- mode main(di, uo) is det.

      6	:- implementation.
      7	main(IO0, IO1) :-
      8	  io.write_string("Hello World!\n", IO0, IO1).

$ mmc --make hello
Making Mercury/int3s/hello.int3
Making Mercury/ints/hello.int
Making Mercury/cs/hello.c
Making Mercury/os/hello.o
Making hello

$ ./hello

*** Mercury runtime: caught segmentation violation ***
cause: address not mapped to object
address involved: (nil)
This may have been caused by a stack overflow, due to unbounded recursion.
exiting from signal handler
Segmentation fault

```

-- 
vl


More information about the users mailing list