This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

gcc-3.2.1 and gcc-3.1.1 compiler problem with bind-9.2.2rc1


I am enclosing the second of my messages to the bind9-bugs
reporting address.

System: Solaris-8, x86 architecture
SunOS newton 5.8 Generic_108529-18 i86pc i386 i86pc

Commands to build the bind software were:

	setenv LD_RUN_PATH /opt/openssl/lib
	setenv CC gcc
	setenv CFLAGS -O

	./configure --prefix=/opt/bind --with-openssl=/opt/openssl --disable-threads
	make

The program compiles, but malfunctions, as documented in the
forwarded message below.  The same malfunction occurs without the
"--disable-threads" (and was my first message reporting this).

If I compile with Sun's compiler, or if I use gcc without the "-O"
the software appears to behave correctly.  Apparently this is an
optimization problem.

The version of openssl used was 0.9.7a, and it was built with shared
dynamic libraries.  The openssl build was with Sun's compiler.

 -NWR

------- Forwarded Message

Date: Thu, 20 Feb 2003 21:24:52 -0600
From:  Neil W Rickert <rickert at newton dot cs dot niu dot edu>
To:  Request Tracker <bind9-bugs at isc dot org>
Subject:  Re: [ISC-Bugs #5172] (bind9) ASSERT error with bind-9.2.2rc1 and openssl-0.9.7a 

Request Tracker <bind9-bugs at isc dot org> wrote:

[lots deleted for readability]

>	This stack backtrace is inconsistant with the previous message.

>	It also can only be produced if the build is threaded and there
>	is a race condition that affects this.

>        while (source->length > 2) {
>                buf[0] = base64[(source->base[0]>>2)&0x3f];
>                buf[1] = base64[((source->base[0]<<4)&0x30)|
>                                ((source->base[1]>>4)&0x0f)];
>                buf[2] = base64[((source->base[1]<<2)&0x3c)|
>                                ((source->base[2]>>6)&0x03)];
>                buf[3] = base64[source->base[2]&0x3f];
>                RETERR(str_totext(buf, target));
>                isc_region_consume(source, 3);  *****

>                loops++;
>                if (source->length != 0 &&
>                    (int)((loops + 1) * 4) >= wordlength)
>                {
>                        loops = 0;
>                        RETERR(str_totext(wordbreak, target));
>                }
>        }

>	This is the only point in the function that results in abort()
>	being called and it will only be called if the INSIST below
>	fails.

>#define isc_region_consume(r,l) \
>        do { \
>                isc_region_t *_r = (r); \
>                unsigned int _l = (l); \
>                INSIST(_r->length >= _l); \
>                _r->base += _l; \
>                _r->length -= _l; \
>        } while (0)

>	Can you please see if you can reproduce this with a non-threaded
>	build?  I'm thinking that this could be as the result of compiler
>	error.

Yes, I can reproduce with a non-threaded build, enclosed below.

The original build used gcc-3.2.1

The unthreaded build also used gcc-3.2.1

I tried a threaded build with gcc-3.1.1  and the same problem.

I then compiled with Sun's compiler.  That worked fine.

Script started on Thu Feb 20 20:40:57 2003
newton:rickert 1% ./bind-9.2.2rc1/bin/dig/dig niu.edu soa

; <<>> DiG 9.2.2rc1 <<>> niu.edu soa
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 18072
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 4, ADDITIONAL: 4
masterdump.c:361: REQUIRE((((rdataset) != 0) && (((const isc__magic_t *)(rdataset))->magic == ((('D') << 24 | ('N') << 16 | ('S') << 8 | ('R')))))) failed.
Abort (core dumped)
newton:rickert 2% cd bind*/bin/dig
newton:rickert 3% ls
Makefile      dig.docbook   host          host.o        win32
Makefile.in   dig.html      host.1        include
dig           dig.o         host.c        nslookup
dig.1         dighost.c     host.docbook  nslookup.c
dig.c         dighost.o     host.html     nslookup.o
newton:rickert 4% gdb dig /tmp/nwr/core
GNU gdb 5.2
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-pc-solaris2.8"...
(no debugging symbols found)...
Core was generated by `./bind-9.2.2rc1/bin/dig/dig niu.edu soa'.
Program terminated with signal 6, Aborted.
Reading symbols from /opt/openssl/lib/libcrypto.so.0.9.7...
(no debugging symbols found)...done.
Loaded symbols for /opt/openssl/lib/libcrypto.so.0.9.7
Reading symbols from /usr/lib/libnsl.so.1...(no debugging symbols found)...
done.
Loaded symbols for /usr/lib/libnsl.so.1
Reading symbols from /usr/lib/libsocket.so.1...(no debugging symbols found)...
done.
Loaded symbols for /usr/lib/libsocket.so.1
Reading symbols from /usr/lib/libc.so.1...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libc.so.1
Reading symbols from /usr/lib/libdl.so.1...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libdl.so.1
Reading symbols from /usr/lib/libmp.so.2...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libmp.so.2
#0  0xdf99a920 in _libc_kill () from /usr/lib/libc.so.1
(gdb) where
#0  0xdf99a920 in _libc_kill () from /usr/lib/libc.so.1
#1  0xdf95bf2e in raise () from /usr/lib/libc.so.1
#2  0xdf94c070 in abort () from /usr/lib/libc.so.1
#3  0x080f26c4 in isc_base64_totext ()
#4  0x080688f9 in rdataset_totext ()
#5  0x08068ea9 in dns_master_rdatasettotext ()
#6  0x0806e3e3 in dns_message_sectiontotext ()
#7  0x0805f5a6 in printmessage ()
#8  0x08065d35 in recv_done ()
#9  0x080fece9 in dispatch ()
#10 0x080ff1e7 in isc__taskmgr_dispatch ()
#11 0x08100a55 in evloop ()
#12 0x08100c89 in isc_app_run ()
#13 0x08061025 in main ()
#14 0x0805ec1d in _start ()
(gdb) q
newton:rickert 5% 
script done on Thu Feb 20 20:41:58 2003

 -NWR

------- End of Forwarded Message


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]