Eigenstate: myrddin-dev mailing list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Out-of-bounds error when printing out a function value


On Tue, 5 Dec 2017 17:03:14 +0800, nml <arumakanil@xxxxxxxxx> wrote:

> 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
 
Should be fixed for all extern const symbols, and not just functions. I
was overly specific in my first fix. s/isconstfn/d->decl.isconst \&\& d->decl.isextern/g

-- 
    Ori Bernstein

Follow-Ups:
Re: Out-of-bounds error when printing out a function valueOri Bernstein <ori@xxxxxxxxxxxxxx>
References:
Out-of-bounds error when printing out a function valuenml <arumakanil@xxxxxxxxx>
Re: Out-of-bounds error when printing out a function valuenml <arumakanil@xxxxxxxxx>