[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Out-of-bounds error when printing out a function value
- Subject: Re: Out-of-bounds error when printing out a function value
- From: nml <arumakanil@xxxxxxxxx>
- Reply-to: myrddin-dev@xxxxxxxxxxxxxx
- Date: Tue, 5 Dec 2017 17:03:14 +0800
- To: myrddin-dev@xxxxxxxxxxxxxx
Probably related issues:
Changing the symbol _start to _edata or __bss_start, the behavior seems to
be not as expected either.
use std
const main = {
extern const _edata : void#
std.put("p = {}\n", &_edata)
}
Output:
Building 6m -I /lib/myr in.myr ld -o a.out /lib/myr/_myrrt.o in.o -lstd
-L/lib/myr -lsys
p = 0x00007ffe22e228b8
_start works correctly after updating to the latest.
On 5 December 2017 at 14:36, nml <arumakanil@xxxxxxxxx> wrote:
> The following program:
>
> use std
> const main = {
> extern const _start : (->void)
> std.put("_start = {x}\n", _start)
> }
>
> Output:
> Building
> 6m -I /lib/myr in.myr ld -o a.out /lib/myr/_myrrt.o in.o -lstd
> -L/lib/myr -lsys 0x000000000041150d: out of bounds access Internal
> error: /a.out: exited with signal 31
>
> Looks like a bug. I expected that the value shown by nm is printed.
>
> --
> mura
>
>
>