Re: [Bug?] Assertion triggered by seemingly-correct code
[Thread Prev] | [Thread Next]
- Subject: Re: [Bug?] Assertion triggered by seemingly-correct code
- From: Adrian Perez de Castro <aperez@xxxxxxxxxx>
- Date: Fri, 10 Mar 2017 12:20:20 +0200
- To: myrddin-dev@xxxxxxxxxxxxxx
Hi Ori, On Thu, 9 Mar 2017 14:04:25 -0800, Ori Bernstein <ori@xxxxxxxxxxxxxx> wrote: > Confirmed, and fix pushed. > > The bug was that when we're loading imports from > hip.use, it was trying to put the transitive > imports into the wrong symbol table. This made > the namespaces mismatch. I can confirm that the issue is gone, and the complete version of the module I am writing also builds fine now \o/ Thanks for fixing the issue so quickly. Cheers, > On Thu, 9 Mar 2017 20:02:42 +0200 > Adrian Perez de Castro <aperez@xxxxxxxxxx> wrote: > > > Hello list! > > > > I have been playing with Myrddin for the last days (I have a thing for exotic > > minimalistic programmin languages :P), now that 0.1.1 has been released. While > > trying to build a parser for the HiPack [0] serialization format at some point > > I started getting the following output from "mbld": > > > > % mbld > > project base /home/aperez/devel/hipack-myr: > > hipack... > > 6m hip.myr > > 6m main.myr > > 6m: node.c:485: setns: Assertion `!ns || !n->name.ns || !strcmp(n->name.ns, ns)' failed. > > CRASH: "6m main.myr" > > % > > > > But the code I am writing should be (AFAIU) correct. I have been able to > > reduce the size of the input source files so hopefully they are small enough > > to help track down the bug. If there is a bug, because it could be as well > > that my code is wrong :-P > > > > File "hip.myr" (removing the usage of "bio.ioerr" does not trigger the > > assertion): > > > > use bio > > pkg hip = > > type status(@t) = union > > `Ok @t > > `IoErr bio.ioerr // <--- This. > > ;; > > const load : (f : bio.file# -> status(void)) > > ;; > > const load = { f > > -> `Ok void > > } > > > > File "main.myr" (this just creates a "bio.file" and calls "hip.load"): > > > > use bio > > use std > > use "hip" > > const main = { > > var f = bio.mkfile(0, bio.Rd) > > std.put("{}\n", hip.load(f)) > > bio.free(f) > > } > > > > FWIW, the assertion gets triggered both with 0.1.1 and building from the > > current top of the Git "master" branch. > > > > Cheers, and thanks for working on Myrddin, it has been fun to use so far :) > > > > --- > > [0] http://hipack.org — 🎩 Adrián
Attachment:
pgpz8bMdvIuXc.pgp
Description: PGP signature
[Bug?] Assertion triggered by seemingly-correct code | Adrian Perez de Castro <aperez@xxxxxxxxxx> |
Re: [Bug?] Assertion triggered by seemingly-correct code | Ori Bernstein <ori@xxxxxxxxxxxxxx> |
- Prev by Date: Re: [Bug?] Assertion triggered by seemingly-correct code
- Next by Date: Source debugging in GDB.
- Previous by thread: Re: [Bug?] Assertion triggered by seemingly-correct code
- Next by thread: Source debugging in GDB.
- Index(es):