Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fail to compile ASN.1 module with BIT STRING values using BER +JER encodings #8291

Closed
isvilen opened this issue Mar 21, 2024 · 1 comment · Fixed by #8297
Closed

Fail to compile ASN.1 module with BIT STRING values using BER +JER encodings #8291

isvilen opened this issue Mar 21, 2024 · 1 comment · Fixed by #8297
Assignees
Labels
bug Issue is reported as a bug team:VM Assigned to OTP team VM

Comments

@isvilen
Copy link
Contributor

isvilen commented Mar 21, 2024

Describe the bug
When there are BIT STRING values definitions in ASN.1 module compilation fails if both BER and JER options are used.

To Reproduce
// BitStr.asn
BitStr DEFINITIONS AUTOMATIC TAGS ::=
BEGIN
Value ::= BIT STRING {zero(0), one(1)}
END

erlc -bber +jer BitStr.asn

.../BitStr.erl:398:1: function encode_bitstring/1 already defined
% 398| encode_bitstring([B8, B7, B6, B5, B4, B3, B2, B1 | Rest]) ->
% | ^

Affected versions
OTP 27.0-rc2

@isvilen isvilen added the bug Issue is reported as a bug label Mar 21, 2024
@bjorng bjorng self-assigned this Mar 22, 2024
@bjorng bjorng added the team:VM Assigned to OTP team VM label Mar 22, 2024
@bjorng bjorng linked a pull request Mar 22, 2024 that will close this issue
@bjorng
Copy link
Contributor

bjorng commented Mar 22, 2024

Thanks! I've fixed the bug in the linked pull request.

@bjorng bjorng closed this as completed in 58bd650 Mar 25, 2024
bjorng added a commit that referenced this issue Mar 25, 2024
…aint

* bjorn/asn1/ber-jer-bitstrings/GH-8291/OTP-19039:
  asn1: Fix compilation error when BER and JER are combined
rickard-green pushed a commit that referenced this issue Apr 12, 2024
…aint-26

* bjorn/asn1/ber-jer-bitstrings/GH-8291/OTP-19039:
  asn1: Fix compilation error when BER and JER are combined
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue is reported as a bug team:VM Assigned to OTP team VM
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants