Hi,

I am running an application that interfaces with MySQL from c++. When
I try to run the application, I get a segmentation fault at the line
where I call mysql_init. Here is part of the output from gdb

#0  0x081a0e78 in elf_machine_rel.0 () at ../sysdeps/i386/dl-machine.h:333
#1  0x081a113a in elf_dynamic_do_rel.4 () at do-rel.h:100
#2  0x081a12db in _dl_relocate_object (l=0x821ec40, scope=0x821ed84, lazy=1,
   consider_profiling=0) at dl-reloc.c:158
#3  0x081984ee in dl_open_worker (a=0xbfa25380) at dl-open.c:294
#4  0x0817c4a4 in _dl_catch_error (objname=0xbfa2537c, errstring=0xbfa25378,
   operate=0x8198040 <dl_open_worker>, args=0xbfa25380) at dl-error.c:152
#5  0x08198606 in _dl_open (file=0xbfa254fc "libnss_files.so.2", mode=1,
   caller=0x0) at dl-open.c:411
#6  0x0817cf4a in do_dlopen (ptr=0x1) at dl-libc.c:78
#7  0x0817c4a4 in _dl_catch_error (objname=0xbfa254d0, errstring=0xbfa254cc,
   operate=0x817cf30 <do_dlopen>, args=0xbfa254e0) at dl-error.c:152
#8  0x0817cf02 in dlerror_run (operate=0, args=0x40057930) at dl-libc.c:42
#9  0x0817cfd9 in __libc_dlopen (
   __name=0x829eff0 <Address 0x829eff0 out of bounds>) at dl-libc.c:105
#10 0x0816e8ee in __nss_lookup_function (ni=0x821e798,
   fct_name=0x81cb6db "getservbyname_r") at nsswitch.c:340
#11 0x0816e4f0 in __nss_lookup (ni=0x0, fct_name=0x82194ec "", fctp=0xbfa254fc)
   at nsswitch.c:147
#12 0x0816fb04 in __getservbyname_r (name=0x81b2f3b "mysql",
   proto=0x81aa9d6 "tcp", resbuf=0x821a218, buffer=0x821e0e0 "", buflen=1024,
   result=0x829eff0) at ../nss/getXXbyYY_r.c:168
#13 0x0816f965 in getservbyname (name=0x81b2f3b "mysql", proto=0x81aa9d6 "tcp")
   at ../nss/getXXbyYY.c:109
#14 0x080d3e80 in mysql_server_init (argc=0, argv=0x0, groups=0x0)
   at libmysql.c:138
#15 0x080e65f4 in mysql_init (mysql=0x0) at client.c:1418
#16 0x08048534 in DBMonitor (this=0x821c300,
---Type <return> to continue, or q <return> to quit---
   fileName=0xbfa258bd "monitor/parameters") at monitor/DBMonitor.cpp:10

Any help is greatly appreciated.

Cheers,
Sam

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to