Operating System - OpenVMS
1753785 Members
7658 Online
108799 Solutions
New Discussion юеВ

C++ compiler crash - No live locations allowed

 
Magnus Josefsson
Occasional Advisor

C++ compiler crash - No live locations allowed

Hi

Has anyone any idea on what the cause of
the following assert in C++ compiler could be ?
DEC C++ V6.1-003 on OpenVMS Alpha V7.2-1.
Happens if /OPTIMIZE=LEVEL=2 or higher.

Assertion failure: DBGOPT_PROCESS_OPEN_STK_INFO: No live locations allowed
%GEM-F-ASSERTION, DBGOPT_PROCESS_OPEN_STK_INFO: No live locations allowed
%TRACE-F-TRACEBACK, symbolic stack dump follows
image module routine line rel PC abs PC
CXX$COMPILER GEM_DB GEM__DB_ASSERT_END
760 00000000000002DC 00000000003E101C
CXX$COMPILER GEM_OM_COMMON DBGOPT_PROCESS_OPEN_STK_INFO
13310 000000000000E814 00000000005718C4
CXX$COMPILER GEM_OM_COMMON DBGOPT_BACK_OPEN_LOC_INFO
3285 00000000000010E0 0000000000564190
CXX$COMPILER GEM_OM_COMMON DBGOPT_BACK_ONE_LOC_INFO
2793 0000000000000904 00000000005639B4
CXX$COMPILER GEM_OM_COMMON DBGOPT_BACK_ONE_LOC_INFO
2916 0000000000000B28 0000000000563BD8
CXX$COMPILER GEM_OM_COMMON DBGOPT_BACKWARD_PROPAGATE
2715 0000000000000824 00000000005638D4
CXX$COMPILER GEM_OM_COMMON DBGOPT_ANALYZE_RTN
2453 00000000000003EC 000000000056349C
CXX$COMPILER GEM_OM_COMMON GEM_OM_ANALYZE_DBGOPT
2240 00000000000001EC 000000000056329C
CXX$COMPILER GEM_OM_EOBJ GEM_OM_MODULE_FINI
514 00000000000003BC 0000000000579FBC
CXX$COMPILER GEM_CO GEM_CO_COMPILE_MODULE
2941 0000000000000F20 00000000003B87D0
9 REPLIES 9
Ian Miller.
Honored Contributor

Re: C++ compiler crash - No live locations allowed

I expect its a compiler bug and the workaround is to reduce the level of optimization.

You may wish to consider using a newer version of the compiler.
____________________
Purely Personal Opinion
Magnus Josefsson
Occasional Advisor

Re: C++ compiler crash - No live locations allowed

I definitively consider it to be a compiler
bug - and updating the compiler is not an
option in this particular case.

Question is whether anyone would have an
idea on how the compiler bug could be
avoided, e.g. what is a 'live location' !?

The sole purpose for me compiling this stuff
is to use the /OPTIMIZE qualifier ... ;-)
David B Sneddon
Honored Contributor

Re: C++ compiler crash - No live locations allowed

Magnus,

I had a similar problem recently that could be overcome
by using an undocumented GEM compiler option.
Don't have the details right now (I am at home and
the info is at work) but will chase it up tomorrow.

Dave
Ian Miller.
Honored Contributor

Re: C++ compiler crash - No live locations allowed

Dave, there was a /opt=nodbgopt qualifier but I thought that was for a later version.
____________________
Purely Personal Opinion
Magnus Josefsson
Occasional Advisor

Re: C++ compiler crash - No live locations allowed

My immediate problem solved by compiling with
/DEBUG=(TRACEBACK) instead of /DEBUG.

Good enough for the time being.
David B Sneddon
Honored Contributor

Re: C++ compiler crash - No live locations allowed

Magnus,

Attached is what I have been able to work out
about the GEM compiler options.
I have had only a few occassions where I get
GEM-F-ASSERTION messages and found that using
one of /TRACE or /DUMP options seems to fix it.
Try using /LIST/TRACE=CALL_GRAPH with maximum
optimization.
(Attachment create on VMS. Use "unzip -aa" if
necessary.)

Dave
John Gillings
Honored Contributor

Re: C++ compiler crash - No live locations allowed

Magnus,

Please formally report any cases where a current version compiler fails with any kind of traceback or unhandled exception.

The assertion message is a clue to the compiler engineers to help them find and fix the bug. It's not much use to the end user.

>updating the compiler is not an option in this particular case.

I don't understand why a fixed compiler is not an option. You've found a bug. The only way it will ever be fixed is by using a new version, (it may even have already been fixed). So, if you want the bug fixed, your only option is a new version.

Typically installing a new compiler is quick, simple and very low risk. As a rule compilers only ever get better. Regressions are very rare, as the qualification suite for compilers usually includes every failing program that has ever been elevated, so problems tend to stay fixed! (indeed, I remember one compiler engineer commenting that their verification & qualification suite was probably more valuable than their source code!)

Compilers are strictly user mode code. They're basically just text processors. It's always possible for an unprivileged user to take a later version of a compiler, place it in a private directory and use it without having to install it system wide. Some compiler installation kits give the option to save all old versions and select one on a process, group or system wide basis.

I recommend you unpack the latest compiler and test your code against it. If it still fails, submit your code to engineering. If not, you have evidence that upgrading to the latest compiler is worthwhile.

If none of that is acceptable, I guess you'll just have to put up with compiling with lower levels of optimisation.
A crucible of informative mistakes
Magnus Josefsson
Occasional Advisor

Re: C++ compiler crash - No live locations allowed

I was able to avoid the compiler crash
by using the option /DEBUG=(TRACEBACK)
instead of /DEBUG=(SYMBOLS,TRACEBACK).

This was good enough in this particular
case.

Updating the compiler was not an option
in this particular case since I was
re-building a single component within
an old version of a system. That version
is in maintenance mode and we don't want
to change anything in the build-environment.
Later version of the system is built with
newer compilers ... and on new versions of
the OS.
Magnus Josefsson
Occasional Advisor

Re: C++ compiler crash - No live locations allowed


Compiling with /DEBUG=(TRACEBACK) instead of
/DEBUG=(SYMBOLS,TRACEBACK) prevented the
compiler from crashing. Solved my problem.