[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference turris::c_plus_plus

Title:C++
Notice:Read 1.* and use keywords (e.g. SHOW KEY/FULL KIT_CXX_VAX_VMS)
Moderator:DECCXX::AMARTIN
Created:Fri Nov 06 1987
Last Modified:Thu Jun 05 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:3604
Total number of notes:18242

3497.0. "Infinte run-time loop??" by KERNEL::PULLEY (Come! while living waters flow) Tue Mar 18 1997 06:11

Hi,

I've a customer with Digital UNIX v3.2c, C++ v5.5-004.
They reckon--(I think)--that when they get into the iterator, line 32302,
that it goes into an infinite loop, at run-time.

I've included the slice of code that around where they get the problem.
The workaround is to define the name FIX_ME so that it's compiled differently.
Also included below are bits from the machine code listings of the two
different compiles.
They've noticed that the machine when the name is defined, loads register 27
before the JSR instruction that seems to use R27.
When the name is not defined, it doesn't load R27 but still uses it.
Now, if this is likely to be a helpful way of following up the problem, I
have much more of the code, but not the whole thing, that will compile, but
doesn't reproduce, I.e., doesn't show up the loop.
(They've given me a cutdown code that they believe shows the compiler breaking,
in the way that would cause the problem they see with the full code).
Or is it more likely that _groupColl->entries() has been called, so there's
something to iterate with?

Thanks,
Steve.

A bit from the source listing:-
--------------------------------------------------------------------------------
	  32285 void RNLinkGroupWindow::BuildTable()
	  32286 {
	  32287 	_GetCollection();
	  32288 
	  32289 	 
	  32290 	Table()->UseTableData();
	  32291 	Table()->TableData()->DeleteAllRows();
	  32292 	
	  32293 	int rowNum = 0;
	  32294 
	  32295 #ifdef FIX_ME
	  32296 
	  32297 	_groupColl->entries();
	  32298 
	  32299 #endif
	  32300 
	  32301 	if( _groupColl ) ; else _RNDbgAssert( "_groupColl", "linkGroupWindow.cxx", 69 );
	  32302 	RWTPtrHashTableIterator<RNDealLinkGroup>
                         iter(*_groupColl);
	  32303 
	  32304 	while (++iter)
	  32305 	{
	  32306 		RNDealLinkGroup *group = iter.key();		
	  32307 		_CreateNewRow(group, rowNum);
	  32308 		rowNum++;
	  32309 	}
	  32310 
	  32311 	Table()->SetNumRows(rowNum);
	  32312     int visRows = 0;
	  32313     if(rowNum > 15)
	  32314         visRows = 15;
	  32315 	Table()->SetNumVisibleRows(visRows);
	  32316 
	  32317 	Table()->PreventRepaint();
	  32318 	Table()->UpdateVisibleWindow();
	  32319 	Table()->AllowRepaint();
	  32320 }
--------------------------------------------------------------------------------

Cut from machine code, cxx -c -source_listing -machine_code -Dname=FIX_ME:-
--------------------------------------------------------------------------------
12BC  mov 69, r18
12C0  ldq r16, (gp)
12C4  ldq r17, (gp)
12C8  ldq r27, _RNDbgAssert   # r27, 104(gp)
12CC  lda r16, 136(r16)
12D0  lda r17, 112(r17)
12D4  jsr r26, _RNDbgAssert   # r26, (r27)
12D8  ldah gp, BuildTable__17RNLinkGroupWindowXv # gp, (r26)
12DC  lda gp, BuildTable__17RNLinkGroupWindowXv # gp, (gp)
12E0 L$88:
12E0  ldq r17, 440(r9)             # 032302
12E4  lda r16, iter    # r16, 48(sp)
12E8  ldq r27,      # r27, 392(gp)
    __ct__43RWTPtrHashTableIterator__T15RNDealLinkGroupXR35RWTPtrHashTable__T15RNDealLinkGroup
12EC  jsr r26,      # r26, (r27)
    __ct__43RWTPtrHashTableIterator__T15RNDealLinkGroupXR35RWTPtrHashTable__T15RNDealLinkGroup
12F0  ldah gp, BuildTable__17RNLinkGroupWindowXv # gp, (r26)
12F4  lda gp, BuildTable__17RNLinkGroupWindowXv # gp, (gp)
12F8  trapb
12FC  mov 1, r0
--------------------------------------------------------------------------------

Cut from machine code, cxx -c -source_listing -machine_code:-
--------------------------------------------------------------------------------
12BC  mov 69, r18
12C0  ldq r16, (gp)
12C4  ldq r17, (gp)
12C8  ldq r27, _RNDbgAssert   # r27, 104(gp)
12CC  lda r16, 136(r16)
12D0  lda r17, 112(r17)
12D4  jsr r26, _RNDbgAssert   # r26, (r27)
12D8  ldah gp, BuildTable__17RNLinkGroupWindowXv # gp, (r26)
12DC  lda gp, BuildTable__17RNLinkGroupWindowXv # gp, (gp)
12E0 L$88:
12E0  ldq r27,      # r27, 392(gp)        # 032302
    __ct__43RWTPtrHashTableIterator__T15RNDealLinkGroupXR35RWTPtrHashTable__T15RNDealLinkGroup
12E4  jsr r26,      # r26, (r27)
    __ct__43RWTPtrHashTableIterator__T15RNDealLinkGroupXR35RWTPtrHashTable__T15RNDealLinkGroup
12E8  ldah gp, BuildTable__17RNLinkGroupWindowXv # gp, (r26)
12EC  lda gp, BuildTable__17RNLinkGroupWindowXv # gp, (gp)
12F0  trapb
12F4  stl r31, __current_try_block_decl  # r31, 32(sp)
--------------------------------------------------------------------------------
T.RTitleUserPersonal
Name
DateLines
3497.1I think we need more info...DECC::J_WARDTue Mar 18 1997 09:1110
>(They've given me a cutdown code that they believe shows the compiler breaking,
>in the way that would cause the problem they see with the full code).

My guess is we'll need at this code (presuming this code compiles
and goes into an infinite loop at run time). Can you put
it on a ftp site or send it via email directly to me?

thanks
Judy
[email protected]