Report information
The Basics
Id:
36373
Status:
resolved
Priority:
Medium/Medium
Queue:

People
Owner:
Nobody in particular
Requestors:
Cc:
AdminCc:

BugTracker
Version Fixed:
9.8.8, 9.9.6, 9.9.6-S1, 9.10.1, 9.11.0
Version Found:
(no value)
Versions Affected:
(no value)
Versions Planned:
(no value)
Priority:
(no value)
Severity:
S3 Low
CVSS Score:
(no value)
CVE ID:
(no value)
Component:
(no value)
Area:
feature

Dates
Created:Mon, 23 Jun 2014 16:52:46 -0400
Updated:Thu, 03 Aug 2017 09:39:40 -0400
Closed:Tue, 01 Jul 2014 18:59:37 -0400



This bug tracker is no longer active.

Please go to our Gitlab to submit issues (both feature requests and bug reports) for active projects maintained by Internet Systems Consortium (ISC).

Due to security and confidentiality requirements, full access is limited to the primary maintainers.

Subject: duplicate file-static variables OR what's up with rbtdb64.c?
I ran into this while looking through a core file. At first I thought that gdb had lost its mind, but now I think that maybe we've got a problem in our code. It seems that the file-static variable zone_methods is declared twice in lib/dns/rbtdb.c (currently lines 6460 and 7870). gdb shows both of these in the output of 'info variables zone_methods', and will report both addresses as being 'zone_methods'. ----BEGIN GDB OUTPUT #1---- (gdb) info variables zone_methods All variables matching regular expression "zone_methods": File rbtdb.c: static dns_dbmethods_t zone_methods; static dns_dbmethods_t zone_methods; (gdb) print &zone_methods $1 = (dns_dbmethods_t *) 0x8b9e40 <zone_methods> (gdb) info symbol 0x8b9e40 zone_methods in section .data (gdb) info symbol 0x8ba200 zone_methods in section .data ----END GDB OUTPUT #1---- Although, as I've been collecting data and output for this ticket, I'm starting to wonder if the duplication goes deeper: ----BEGIN GDB OUTPUT #2---- (gdb) print *(dns_dbmethods_t*)0x8b9e40 $4 = {attach = 0x4d1290 <attach>, [...]} (gdb) print *(dns_dbmethods_t*)0x8ba200 $5 = {attach = 0x4e7fb0 <attach>, [...]} (gdb) info functions ^attach$ All functions matching regular expression "^attach$": File rbtdb.c: static void attach(dns_db_t *, dns_db_t **); static void attach(dns_db_t *, dns_db_t **); File sdb.c: static void attach(dns_db_t *, dns_db_t **); File sdlz.c: static void attach(dns_db_t *, dns_db_t **); File ecdb.c: static void attach(dns_db_t *, dns_db_t **); ----END GDB OUTPUT #2---- Looking at the contents of libdns.a with 'nm', I think it has to do with rbtdb64.c. The contents of which, excluding comments, is included inline here: ----BEGIN rbtdb64.c---- #define DNS_RBTDB_VERSION64 1 #include "rbtdb.c" ----END rbtdb64.c---- It seems that maybe gdb is picking up the 'rbtdb.c' file name for the symbols (both functions and variables) declared and defined in rbtdb64.c via #include of rbtdb.c. What is the purpose of, and value provided by, rbtdb64.c?