gnats-prs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gnats/181: CHDB command must be issued twice ...


From: Yngve Svendsen
Subject: Re: gnats/181: CHDB command must be issued twice ...
Date: 15 Oct 2001 09:44:03 -0000

The following reply was made to PR gnats/181; it has been noted by GNATS.

From: Yngve Svendsen <address@hidden>
To: Milan Zamazal <address@hidden>,address@hidden
Cc:  
Subject: Re: gnats/181: CHDB command must be issued twice ...
Date: Mon, 15 Oct 2001 11:36:30 +0200

 Checking the behaviour of the findDatabaseEntry subroutine, I found the 
 following difference. On Solaris, the while loop runs through all values, 
 the conditions are never satisfied and the subroutine returns a non-NULL value.
 
 On Linux, the conditions are satisfied after a couple of iterations and the 
 routine returns NULL.
 
 Is there something wrong with the databaseEnt pointer on Solaris anyway?
 
 - Yngve
 
 ------------------
 Solaris:
 ------------------
 
 findOrLoadDatabase (programName=0x34a40 "gnatsd", databaseName=0x5d80d 
 "test4", err=0xffbefae4) at database.c:751
 3: databaseName = 0x5d80d "test4"
 2: databaseEnt = (AdmEntry *) 0x0
 1: res = 0x0
 (gdb) next
 3: databaseName = 0x5d80d "test4"
 2: databaseEnt = (AdmEntry *) 0x0
 1: res = 0x51918
 (gdb) next
 3: databaseName = 0x5d80d "test4"
 2: databaseEnt = (AdmEntry *) 0x51918
 1: res = 0x51918
 (gdb) step
 findDatabaseEntry (databaseEnt=0x51918) at database.c:111
 (gdb) next
 findDatabaseEntry (databaseEnt=0x51918) at database.c:112
 (gdb) display res
 11: res = 0x3b29e
 (gdb) display res->databaseEnt
 12: res->databaseEnt = (AdmEntry *) 0x150014f
 (gdb) display databaseEnt
 13: databaseEnt = (AdmEntry *) 0x51918
 (gdb) next
 13: databaseEnt = (AdmEntry *) 0x51918
 12: res->databaseEnt = (AdmEntry *) 0x51918
 11: res = 0x522a8
 (gdb)
 13: databaseEnt = (AdmEntry *) 0x51918
 12: res->databaseEnt = (AdmEntry *) 0x51918
 11: res = 0x522a8
 (gdb)
 
 (and the subroutine returns 0x522a8)
 
 --------------------------------
 Linux:
 --------------------------------
 
 findOrLoadDatabase (programName=0x80635b1 "gnatsd",
      databaseName=0x807198d "test4", err=0xbffffaa0) at database.c:751
 1: res = 0x0
 (gdb) display databaseEnt
 3: databaseEnt = (AdmEntry *) 0x0
 (gdb) display databaseName
 4: databaseName = 0x807198d "test4"
 (gdb) next
 4: databaseName = 0x807198d "test4"
 3: databaseEnt = (AdmEntry *) 0x0
 1: res = 0x0
 (gdb) next
 4: databaseName = 0x807198d "test4"
 3: databaseEnt = (AdmEntry *) 0x8078fd0
 1: res = 0x8078fd0
 (gdb) next
 4: databaseName = 0x807198d "test4"
 3: databaseEnt = (AdmEntry *) 0x8078fd0
 1: res = 0x8078fd0
 (gdb) step
 findDatabaseEntry (databaseEnt=0x8078fd0) at database.c:111
 (gdb) next
 (gdb) display res
 5: res = 0x8070c68
 (gdb) display res->databaseEnt
 6: res->databaseEnt = (AdmEntry *) 0x80708f0
 (gdb) display databaseEnt
 7: databaseEnt = (AdmEntry *) 0x8078fd0
 (gdb) next
 7: databaseEnt = (AdmEntry *) 0x8078fd0
 6: res->databaseEnt = (AdmEntry *) 0x80708f0
 5: res = 0x8070c68
 (gdb)
 7: databaseEnt = (AdmEntry *) 0x8078fd0
 6: res->databaseEnt = (AdmEntry *) Cannot access memory at address 0x38
 Disabling display 6 to avoid infinite recursion.
 (gdb)
 7: databaseEnt = (AdmEntry *) 0x8078fd0
 5: res = 0x0
 (gdb)
 
 (..and the subroutine returns 0)
 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]