ASN.1. generation with erlc -bber works / erlc -bper - fails

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

ASN.1. generation with erlc -bber works / erlc -bper - fails

ram3a12
Hi,

I have found an ASN.1 fragment that compiles well with erlc -bber flag but fails with erlc -bper.

> iri@ubuntu:~/asn$ erlc -bber TEST.asn
  -> works well

> iri@ubuntu:~/asn$ erlc -bper TEST.asn
  -> raises an error
      ------------------------------------------------
      {{badmatch,1799999989},
       [{asn1ct_imm,per_enc_constrained,4,[{file,"asn1ct_imm.erl"},{line,1139}]},
        {asn1ct_imm,per_enc_integer_1,3,[{file,"asn1ct_imm.erl"},{line,1094}]},
        {asn1ct_imm,'-per_enc_integer/4-lc$^0/1-0-',4,
                    [{file,"asn1ct_imm.erl"},{line,248}]},
        {asn1ct_imm,per_enc_integer,4,[{file,"asn1ct_imm.erl"},{line,248}]},
        {asn1ct_gen_per,gen_encode_prim,3,[{file,"asn1ct_gen_per.erl"},{line,121}]},
        {asn1ct_gen_per,gen_encode_user,2,[{file,"asn1ct_gen_per.erl"},{line,98}]},
        {asn1ct_gen,pgen_types,5,[{file,"asn1ct_gen.erl"},{line,123}]},
        {asn1ct_gen,pgen_typeorval,4,[{file,"asn1ct_gen.erl"},{line,105}]}]}
      ------------------------------------------------

With ASN.1 -> C compiler
> asn1c -gen-PER TEST.asn
  -> also works well


File TEST.asn:
------------------------
    TEST DEFINITIONS IMPLICIT TAGS ::=
    BEGIN
      Longitude ::= INTEGER
      {
        oneMicrodegreeEast(10),
        oneMicrodegreeWest(-10),
        unavailable(1800000001)
      } (-1799999999..1800000001)
    END
------------------------


Thanks,

Ingars
/////


_______________________________________________
erlang-bugs mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-bugs
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: ASN.1. generation with erlc -bber works / erlc -bper - fails

Björn Gustavsson-4
On Thu, Jan 21, 2016 at 1:38 PM, Ingars <[hidden email]> wrote:
> Hi,
>
> I have found an ASN.1 fragment that compiles well with erlc -bber flag but
> fails with erlc -bper.
>

Thanks for the bug report.

Here is a branch that fixes the bug:

https://github.com/bjorng/otp/tree/bjorn/asn1/fix-per-crash/OTP-13257

The fix will be included in OTP 18.3.

/Björn

--
Björn Gustavsson, Erlang/OTP, Ericsson AB
_______________________________________________
erlang-bugs mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-bugs
Loading...