The current production release version of the ASN1C compiler is 6.2.5, released on February 12, 2010. Bug fixes that went into this release include the following:
- Fixed a bug causing a segmentation fault when attempting to free memory (ASN-2467).
- Fixed a bug in C# code generation that was causing Encode methods for CHOICEs to be improperly formatted (ASN-2447).
- Fixed a bug in C/C++ makefile generation to ensure that Asn1External.* were properly cleaned (ASN-2432).
- Fixed a bug in BER run-time APIs berDecStrmGetTLVLength and berDecStrmReadTLV (ASN-2424, ASN-2408).
- Fixed a C code generation bug related to the use of the CONTAINING keyword (ASN-2416).
- Fixed a bug in the behavior of the
hfileoption that caused spurious includes forAsn1External.hto be generated (ASN-2405). - Added exception handling to constructors when
-getsetis specified on the command-line. This resolved an issue that caused set methods to throw unwarranted exceptions (ASN-2394). - Fixed several errors in Java code generation related to the use of imported enumerated values, null values, and exception handling (ASN-2391; cf ASN-2394).
- Fixed a
#warningpragma to only be activated when__GNUC__is defined (ASN-2388). - Added functionality to the Java
Asn1XerOpenTypeclass to transform BER-encoded open type data into a binary element (ASN-2370). - Fixed a seg fault caused by C code generation for SEQUENCE
OF types when
-compatis specified on the command-line (ASN-2312).
ASN1C version 6.2.4 was released on December 1, 2009. Bug fixes that went into this release include the following:
- Fixed a bug in which C union structures generated using the -3gpp switch would at times be missing some items. Problem was traced to not properly accounting for extended objects (i.e. info objects after the ... in an object set) (ASN-2334).
- Fixed a crash that would occur at times when compiling ASN.1 specifications that contain parameterized class definitions (ASNVE-300).
- Fixed C-code generation when
–prtToStrwas specified when compiling XSDs (ASN-2361). - Fixed copy code generation for atomic types; prototypes for copy functions were generated for types that did not require them (ASN-2358).
- Updated Java runtime to properly handle daylight savings
time when using the
Asn1UTCTimeclass (ASN-2356). - Added the
PU_GETPADBITSmacro to make it more convenient to get the number of padding bits after a PER encode or decode call (ASN-2341). - Added the
-noEnumConvertcommand-line option to remove utility functions for converting enumerated elements to strings from C/C++ code for all encoding rules but XER and XML (ASN-2340). - Fixed a bug in Java/C# code generation causing default values for enumerations to be improperly generated in initialiation functions (ASN-2330).
- Fixed a bug in C/C++ code generation that prevented proper error statuses from being returned when validating numeric strings (ASN-2318).
- Fixed a bug in C# code generation that caused enumerated elements in sequences to be improperly decoded (ASN-2318).
- Updated C# makefile generation (ASN-2298).
- Fixed an error in Java code generation with get-set
functions that was causing abstract
Asn1Typesetters to be generated for open type values (ASN-2294). - Fixed a problem in converting XSD small integer types (xsd:byte, xsd:short, xsd:unsignedByte, xsd:unsignedShort) to ASN.1. This broke generated PER encode/decode functions (ASN-2293).
- Fixed C# event handler generation to avoid generating an
InvokeCharacterscall for defined or constructed types (ASN-2288). - Fixed a problem in Java constraint checking that caused defined type constraints to go unchecked in their set methods (ASN-2287).
- Added constraint checking to Java constructors when
-getsetis specified on the command line (ASN-2287). - Added the 6.1x version compatibility option to Java GUI (ASN-2287).
- Fixed name clash in Java and C# code generation for
extended enumerations containing an element named
undefined(ASN-2281). - Fixed encoding of BOOLEAN values when the ASN1BOOLTRUE1 flag was enabled (ASN-2280).
- Fixed C/C++ XER code generation for base 10 REAL types (ASN-2278).
- Fixed C/C++ DER code generation for unnamed bit strings. These bit strings were being improperly truncated (ASN-2277).
- Fixed decoding of binary extension element. Fixed the XEROpenType initialization function. (ASN-2273).
- Fixed a bug involving C/C++ code generated to do deferred BER encoding/decoding. If an element that was defer decoded was re-encoded, the resulting encoding was not correct. (ASN-2259)
- Removed an optimization in XSD to C/C++ code generation that would sometimes cause the wrong tags to be added to a BER encoded message. (ASN-2272)
- Fixed PER C-code generation for ENUMERATED items with a single element; constraints were not properly checked on encode (ASN-2267).
Bug fixes that went into the 6.2.3 release include:
- Added 64-bit C/C++ libraries for Visual Studio 2008.
- Fixed C-language event handler code generation for UTF-8 strings (ASN-2245).
- Removed spurious
#defines for CHOICEs that were not actually tagged and added#defines for items contained in the CHOICE; these are prefixed withTVC_, notTV_(ASN-2238). - Fixed missing type qualifier for forward-referenced structures when generating some C code with table constraints (ASN-2218).
- Fixed errors in C# test code generation caused by losing names for types in deeply nested structures (ASN-2216).
- Fixed errors in C# makefile generation that occurred because command lines grew too long for the command prompt to handle (ASN-2214).
- Fixed bugs in C/C++ memory management that would occur when MemFreeAll was called to free all underlying memory in a context. Certain structures that were marked as not to be freed were being freed which led to application crashes. (ASN-2175)
- Fixed a bug that occurred when generating code from an XSD file in which an optional anonymous choice type was contained within a global element. The generated element was not marked as optional. (ASN-2182)
- Fixed Java reader and writer code generation in the case of multiple encoding rules being specified on the command-line. (ASN-2199)
- Fixed a bug in Java code generation of XER SAX handlers in which a try/catch block was being added around a switch statement that did not contain any cases where the caught exception was being thrown. (ASN-2199)
- Fixed a bug in Java/C# code generation of PER decode methods in which repeating elements were being skipped (ASN-2199).
- Fixed character string signedness for
RTCOPYCHARSTRwhen invoked forxsd:anytypes (ASN-2195). - Fixed a bug that caused some optional sequence to be mandatory (ASN-2194).
- Fixed a bug in which some data members are not initialized in C++ contractor (ASN-2175).
- Fixed a bug in which no error was reported when an unexpected element in a sequence is encountered (ASN-2175).
- Added a
#defineforxu_hex_dumpinasn1ber.h, which was deprecated in favor of usingrtxHexDumpinstead (ASN-2163). - Fixed NullException errors that arise when generating equality tests for extension elements in Java (ASN-2133).
- Fixed a regression caused by an optimization in how PER-encoded open type information is decoded using C/C++. The regression occurred when an unknown CHOICE element was being decoded in a CHOICE type that was declared to contain an open extension. (ASN-2106)
- Changed behavior of set methods in Java to check constraints when the set method is called. This change will improve constraint checking by providing immediate feedback when a constraint is violated rather than waiting for encode (ASN-1888).
- Updates to ASN1C Eclipse plugin:
- Added support for command-line arguments added in the 6.2.x versions of ASN1C.
- Added the ability to create C/C++ (CDT) projects.
Bug fixes in the 6.2.2 release include:
- Modified the way encoded buffers are expanded in Java/C# to double the size on each expansion. This resulted in a significant performance improvement when large data sets were being encoded using the default buffer size increment.
- Fixed a code generation bug that caused C++-style event handling code to be inserted into C-only BER parsing code (ASN-2125).
- Fixed a problem in which table constraint handling code was
not being generated if the table constraint was on a type in a
contents constraint. This problem was exposed when generating
code for PKIX 2009 in which extension data was defined using
the following syntax:
extnValue OCTET STRING (CONTAINING EXTENSION.&ExtnType({ExtensionSet}{@extnID})) - Fixed a bug that caused bit strings with trailing zeros to be improperly truncated in the Java run-time (ASN-2098).
- Fixed a bug in the Java run-time which would occur when converting BER or PER encoded data containing open extension items to XML. No method was available in the XML run-time for encoding in this case causing an "Attempt to invoke base class XML method" exception to be triggered. The fix was to simply drop the extension items since there is no way to convert the binary data to XML without schema information. (ASN-2093)
- Fixed a bug that caused ENUMERATED types containing just one element to generate bad constraint-checking code (ASN-2096).
- Fixed a bug in which a real number is truncated when it is encoded into an XML message. (ASN-2080)
- Fixed a bug which occured when using -depends with an ASN.1 file containing multiple modules.
- Numeric strings are now properly populated in test code
generation and checked on encode and decode (regardless of
-strictoption). - Strings are now always null terminated when calling rtCopyCharStr (ASN-2091).
- Fixed binary and hex dumps for PER; characters were missing in the output (ASN-2059).
- Fixed code generation for Java/C# for
SEQUENCEtypes containing optional enumerated items (ASN-2056). - Fixed missing symbol in PER runtime library when compiling with Visual Studio 2005 (ASN-2055).
- Re-added setters for Java when
-getsetis specified so that primitive types may be passed to set values (ASN-2028). - Added project-like features for C/C++ makefiles to allow dumping objects, libraries, source, and binaries to their own directories (ASN-2024).
- Fixed a bug that caused improper code generation for encoding default enumerated values in C# (ASN-2023).
Bug fixes in the 6.2.1 release include:
- Fixed a bug in which long C++ class names were being split into multiple lines causing compilation failures.
- Fixed a bug in all languages in which unconstrained integer value zero was not being PER-encoded correctly. Before it was encoded with length zero and no contents. It is now encoded with length one and value zero.
- Fixed a bug in code C/C++ generation which occurred when -events was used with specs containing BIT or OCTET STRING types that used the CONTAINING keyword (ASN-2039).
- Fixed a bug causing incorrect XER/XML code generation in Java and C# when a default value was supplied for an enumerated type (ASN-2031).
- Added
undefinedto the list of Java and C# reserved words to avoid name collisions with specifications that use those names in enumerated types (ASN-2031). - Fixed makefile generation when
-genMakeLiband-genMakeDLLwere specified (ASN-1992). - Fixed a build issue that resulted in missing symbols errors when compiling with gcc 4.x (ASN-1977).
- Fixed a bug that caused module searches to fail in C# when reader and writer applications were generated (ASN-1974).
- Fixed DER bit string decoding in C/C++, Java, and C#. Trailing zero bits were being improperly truncated in strings with named bits (ASN-1913).
- License file search order has been changed. We now search
in the following order:
- In the directory pointed to by the OSLICDIR environment variable
- In the directory in which ASN1C is installed
- In any directory within the PATH
- Fixed a bug that caused crashes when generating C# reader applications.
New items in the initial 6.2.0 release include:
- Improved Table Constraints handling for 3GPP specifications
using the
-3gppswitch. - Support for the ASN.1
CONTAININGkeyword. - Improved code efficiency when
-compactis specified with-per. New configuration file options<notUsed/>and<perEncoding/>were also added to allow users to selective remove code from the resulting generated files. - Improved memory management in C/C++ results in better
scalability with large messages. Users of our source runtimes
may also recompile them with
MEMCOMPACTdefined to produce a compact version of the library. - Support for XML Namespaces was added.
- ASN.1 syntax checking is improved. (Users preferring a more
lax syntax check can specify
-laxsyntaxon the command line. - Improved XSD code generation for 3GPP specifications.
- Integration with Eclipse is provided through an Eclipse plugin.
- ASN1C can now generate code to use static character arrays, not just pointers, when types are sized and a configuratin option is set.

