Subject: [Cbor] CDDL tool runtime error

From: Jim Hague <[email-masked]>
Date: Fri, 30 Nov 2018 11:11:53 +0000

Hi all,

I've been unable to turn up a Github or Gitlab for the CDDL tool, so I'm
asking here...

CDDL 0.8.6 frequently (but not always - I guess there's a problem with
an optional item) errors on my CDDL for C-DNS. 0.8.5 doesn't. Is this
likely to be because I have some subtle error in my CDDL, or can I hope
it's a tool problem?

Partial backtrace:

/usr/local/lib/ruby/gems/2.4.0/gems/cddl-0.8.6/lib/cddl.rb:332:in
`generate1': grpent in map [:grpent, [:member, 1, 1, [:int, 4], [:array,
[:member, 1, Infinity, nil, [:array, [:member, 1, Infinity, nil, [:prim,
0]]]]]], [:member, 1, 1, [:int, 5], [:array, [:member, 1, Infinity, nil,
[:map, [:member, 1, 1, [:int, 0], [:prim, 0]], [:member, 1, 1, [:int,
1], [:prim, 0]]]]]]] (RuntimeError)
	from /usr/local/lib/ruby/gems/2.4.0/gems/cddl-0.8.6/lib/cddl.rb:298:in
`block in generate1'
	from /usr/local/lib/ruby/gems/2.4.0/gems/cddl-0.8.6/lib/cddl.rb:298:in
`each'
	from /usr/local/lib/ruby/gems/2.4.0/gems/cddl-0.8.6/lib/cddl.rb:298:in
`flat_map'
	from /usr/local/lib/ruby/gems/2.4.0/gems/cddl-0.8.6/lib/cddl.rb:298:in
`generate1'
	from /usr/local/lib/ruby/gems/2.4.0/gems/cddl-0.8.6/lib/cddl.rb:347:in
`block in generate1'
	from /usr/local/lib/ruby/gems/2.4.0/gems/cddl-0.8.6/lib/cddl.rb:346:in
`initialize'
	from /usr/local/lib/ruby/gems/2.4.0/gems/cddl-0.8.6/lib/cddl.rb:346:in
`new'
	from /usr/local/lib/ruby/gems/2.4.0/gems/cddl-0.8.6/lib/cddl.rb:346:in
`generate1'
	from /usr/local/lib/ruby/gems/2.4.0/gems/cddl-0.8.6/lib/cddl.rb:298:in
`block in generate1'
	from /usr/local/lib/ruby/gems/2.4.0/gems/cddl-0.8.6/lib/cddl.rb:298:in
`each'
	from /usr/local/lib/ruby/gems/2.4.0/gems/cddl-0.8.6/lib/cddl.rb:298:in
`flat_map'
	from /usr/local/lib/ruby/gems/2.4.0/gems/cddl-0.8.6/lib/cddl.rb:298:in
`generate1'
	from /usr/local/lib/ruby/gems/2.4.0/gems/cddl-0.8.6/lib/cddl.rb:347:in
`block in generate1'
	from /usr/local/lib/ruby/gems/2.4.0/gems/cddl-0.8.6/lib/cddl.rb:346:in
`initialize'
	from /usr/local/lib/ruby/gems/2.4.0/gems/cddl-0.8.6/lib/cddl.rb:346:in
`new'
-- 
Jim Hague - [email-masked]          Never trust a computer you can't lift.

---

From: Carsten Bormann <[email-masked]>
Date: Fri, 30 Nov 2018 13:09:47 +0100

Hi Jim,

This looks like a bug I had been chasing for a while before I decided to reimplement the map matcher/generator (which, unfortunately, isn’t done).  Can you send me the CDDL that triggered this?

Grüße, Carsten

> On Nov 30, 2018, at 12:11, Jim Hague <[email-masked]> wrote:
> 
> Hi all,
> 
> _______________________________________________
> CBOR mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/cbor
>