YottaDB / YDB

Mirrored from https://gitlab.com/YottaDB/DB/YDB
Other
76 stars 37 forks source link

GTMASSERT2 fatal error while compiling M program with literal optimization in UTF-8 mode #329

Open nars1 opened 6 years ago

nars1 commented 6 years ago

Final Release Note

Description

@littlecatspb reported this issue in #258 but this deserves an issue of its own. His original test case has been simplified here but still demonstrates the GTMASSERT2 error. The below uses GT.M V6.3-005.

> cat x.m
 if $translate($justify(" ",0)," ",$select(($zchset="UTF-8"):$char(65535),1:$char(255)))

> setenv LC_ALL en_US.utf8
> setenv gtm_chset UTF-8            

> mumps x.m
         if $translate($justify(" ",0)," ",$select(($zchset="UTF-8"):$char(65535),1:$char(255)))
                                                                                ^-----
                At column 73, line 1, source module x.m
%GTM-E-INVDLRCVAL, Invalid $CHAR() value 65535
%GTM-F-GTMASSERT2, GT.M V6.3-005 Linux x86_64 - Assert failed V63005/sr_port/emit_code.c line 1141 for expression (FALSE && ct->opcode)

Draft Release Note

Compiling M programs in UTF-8 mode works fine. Previously, in some cases where the M line could be optimized (due to string literal usage), the compilation could abnormally terminate with a GTMASSERT2 fatal error.