ASN1 parsing bug

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

ASN1 parsing bug

Morten Nygaard Åsnes
Hi,
I've encountered what I think is a bug in parsing asn1. Here is a testcase:

Testcase DEFINITIONS IMPLICIT TAGS ::=

BEGIN

 BaseType ::= ENUMERATED {
foo,
bar,
buz,
 qux,
...
}
 SubType ::= BaseType ( foo | bar )

END

This gives the following error:

28> asn1ct:compile("Testcase", [ber,verbose]).
Erlang ASN.1 version "2.0.4", compiling "Testcase.asn"
Compiler Options: [ber,verbose,{i,"."}]
asn1error:13:'Testcase':'SubType'
{asn1,{undefined_type,bar}}
{error,[{error,{type,13,'Testcase','SubType',
                     {asn1,{undefined_type,bar}}}}]}

If I remove the extension marker in BaseType, it compiles fine.

This is using R16B03 on Windows
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-bugs/attachments/20140110/eec8ced7/attachment.html>

Reply | Threaded
Open this post in threaded view
|

ASN1 parsing bug

Morten Nygaard Åsnes
Any chance of this getting fixed?

Cheers, Morten
On Jan 10, 2014 1:41 PM, "Morten Nygaard ?snes" <morten.aasnes>
wrote:

> Hi,
> I've encountered what I think is a bug in parsing asn1. Here is a testcase:
>
> Testcase DEFINITIONS IMPLICIT TAGS ::=
>
> BEGIN
>
>  BaseType ::= ENUMERATED {
> foo,
> bar,
> buz,
>  qux,
> ...
> }
>  SubType ::= BaseType ( foo | bar )
>
> END
>
> This gives the following error:
>
> 28> asn1ct:compile("Testcase", [ber,verbose]).
> Erlang ASN.1 version "2.0.4", compiling "Testcase.asn"
> Compiler Options: [ber,verbose,{i,"."}]
> asn1error:13:'Testcase':'SubType'
> {asn1,{undefined_type,bar}}
> {error,[{error,{type,13,'Testcase','SubType',
>                      {asn1,{undefined_type,bar}}}}]}
>
> If I remove the extension marker in BaseType, it compiles fine.
>
> This is using R16B03 on Windows
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-bugs/attachments/20140131/932795e0/attachment.html>

Reply | Threaded
Open this post in threaded view
|

ASN1 parsing bug

Björn Gustavsson-3
On Fri, Jan 31, 2014 at 9:58 AM, Morten Nygaard ?snes <
morten.aasnes> wrote:

> Any chance of this getting fixed?
>
>
Yes, we hope to fix it before the final release of OTP 17.
It will probably be included in the next release candidate.

/Bjorn


--
Bj?rn Gustavsson, Erlang/OTP, Ericsson AB
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-bugs/attachments/20140131/cde48d70/attachment-0001.html>

Reply | Threaded
Open this post in threaded view
|

ASN1 parsing bug

Björn Gustavsson-3
On Fri, Jan 31, 2014 at 3:29 PM, Bj?rn Gustavsson <bjorn> wrote:
> On Fri, Jan 31, 2014 at 9:58 AM, Morten Nygaard ?snes
> <morten.aasnes> wrote:
>>
>> Any chance of this getting fixed?
>
>
> Yes, we hope to fix it before the final release of OTP 17.
> It will probably be included in the next release candidate.
>

The correction has been merged to master, and will be
included in the next release candidate.

/Bjorn

--
Bj?rn Gustavsson, Erlang/OTP, Ericsson AB