[LLVMbugs] [Bug 582] NEW: Dereferencing end() in IndVarSimplify::RewriteLoopExitValues()

Reid Spencer reid at x10sys.com
Mon Jun 13 21:12:19 PDT 2005


Bryan,

Since you seem to be generating a lot of these kinds of bug reports,
could you please help us out a bit by creating attachments to the
reports that include:

1. Original C code.
2. Corresponding LLVM Code
3. Stack Trace to the bug

This will help us out a lot in tracking these down. To generate these
steps for program "test.c", you would do the following:

1. Add test.c as an attachment
2. Run "llvm-gcc -save-temps -c test.c" and add test.s as an attachment
3. Run "gdb gccas" then enter "run test.s" and then enter "where".
   Capture the output of "where" (a stack trace) and add it to the 
   bug report.

Thanks,

Reid.

On Mon, 2005-06-13 at 22:28 -0500, bugzilla-daemon at cs.uiuc.edu wrote:
> http://llvm.cs.uiuc.edu/bugs/show_bug.cgi?id=582
> 
>            Summary: Dereferencing end() in
>                     IndVarSimplify::RewriteLoopExitValues()
>            Product: tools
>            Version: 1.5
>           Platform: PC
>         OS/Version: Linux
>             Status: NEW
>           Severity: normal
>           Priority: P2
>          Component: gccas
>         AssignedTo: unassignedbugs at nondot.org
>         ReportedBy: bryan.turner at pobox.com
> 
> 
> I've tried reducing this test case as far as possible, but it appears to require
> all of the lines below.
> 
> LLVM 1.5 release
> 
> gccas: /home/brturn/llvm/llvm/include/llvm/ADT/ilist:120: typename
> bidirectional_iterator<NodeTy, ptrdiff_t>::reference
> llvm::ilist_iterator<NodeTy>::operator*() const [with NodeTy =
> llvm::Instruction]: Assertion `Traits::getNext(NodePtr) != 0 && "Dereferencing
> end()!"' failed.
> 
> /*
> // --- RANDOMLY GENERATED PROGRAM ---
> // Program Generator by Bryan Turner (bryan.turner at pobox.com)
> */
> 
> #include <stdio.h>
> unsigned long context = 0;
> unsigned long DEPTH = 0;
> void DumbHash( unsigned long value, unsigned int len )
> {
> 	context += value;
> 	context ^= 0xA50F5AF0;
> 	printf( "%d\n", context );
> }
> 
> /* --- GLOBAL VARIABLES --- */
> char g_45534591 = 0x4B;
> 
> 
> /* --- FORWARD DECLARATIONS --- */
> int func_47880058( char l_30575406, char l_86920434 );
> 
> 
> /* --- FUNCTIONS --- */
> /* ------------------------------------------ */
> int func_47880058( char l_30575406, char l_86920434 )
> {
> 	char l_09369994 = 0x8F;
> 	if ( DEPTH < 5 ) { DEPTH++; func_47880058( g_45534591, l_30575406 ) ; DEPTH--; }
> 	return l_09369994;
> }
> 
> /* --- MAIN --- */
> /* ------------------------------------------ */
> int main(  )
> {
> 	unsigned char l_59025022 = 0xE3;
> 	char l_14237116 = 0xD2;
> 	l_59025022 = l_59025022;
> 	for ( int i=0; i<100; i++ )
> 	{
> 		unsigned short l_61607339 = 0x3A37;
> 
> 		for ( int i=0; i<100; i++ )
> 		{
> 			char l_06790138 = 0xBD;
> 			l_59025022 = l_14237116;
> 			func_47880058( l_59025022, l_06790138 ) ;
> 			DumbHash( l_06790138, 1 );
> 		}
> 
> 		if ( ( 0x3828ECC6 & 0x3111 )  )
> 		{
> 			short l_96478320 = 0xC140;
> 			unsigned short l_40278093 = 0x9CAB;
> 			if ( l_14237116 )
> 			{
> 				l_14237116 = l_61607339;
> 				DumbHash( g_45534591, 1 );
> 			}
> 		}
> 
> 		DumbHash( l_59025022, 1 );
> 	}
> 	DumbHash( l_59025022, 1 );
> }
> 
> 
> 
> ------- You are receiving this mail because: -------
> You are on the CC list for the bug, or are watching someone who is.
> 
> _______________________________________________
> LLVMbugs mailing list
> LLVMbugs at cs.uiuc.edu
> http://mail.cs.uiuc.edu/mailman/listinfo/llvmbugs
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20050613/6eb029bb/attachment.sig>


More information about the llvm-bugs mailing list