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

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

Open
nars1 opened this issue Aug 1, 2018 · 0 comments
Assignees
Projects
Milestone

Comments

@nars1
Copy link
Collaborator

nars1 commented Aug 1, 2018

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.

@nars1 nars1 added this to the r124 milestone Aug 1, 2018
@nars1 nars1 self-assigned this Aug 1, 2018
@nars1 nars1 added this to To do in r1.24 via automation Aug 1, 2018
chathaway-codes added a commit that referenced this issue Sep 27, 2018
Errors caused by invalid UTF-8 characters wouldn't trigger the setting
of rts_error_in_parse, but would prevent the yielding of some triple
structures. This caused issues further down the road in the object code
emition.

This fix adds the UTF-8 invalid character error (ERR_INVDLRCVAL) to the
list of errors which could occur at compile-time that would prevent the
boolean optimizations from taking place (in this case, $SELECT
optimizations).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
r1.24
  
To do
Development

No branches or pull requests

1 participant