Subject: ctype problems on dynamic linking
To: None <current-users@sun-lamp.cs.berkeley.edu>
From: Michael L. VanLoon -- Iowa State University <michaelv@iastate.edu>
List: current-users
Date: 11/23/1993 21:19:08
While trying to build top, I ran into a ctype problem. If built with
shared libraries, top core dumps on "isprint", trying to access the
_ctype_ array. But the memory where _ctype_ is supposed to be is
inaccessable:
----- ----- ----- ----- ----- ----- ----- ----- -----
[root@stingray]src/usr.local.bin/top# gdb ./top
Reading symbol data from /local/src/othersrc/top/top...done.
(gdb) run
Starting program: /local/src/othersrc/top/top
Program received signal 11, Segmentation fault
Reading in symbols for display.c...done.
0x43c8 in printable (str=(char *) 0x2da80 "nfsd") (display.c line 1048)
1048 if (!isprint(ch))
(gdb) print /x _ctype_
$1 = 0x4b363120
(gdb) print * (char *) _ctype_
ptrace: Invalid argument.
Cannot read memory: address 0x4b363120 out of bounds.
----- ----- ----- ----- ----- ----- ----- ----- -----
If linked statically, this problem disappears. What's up with
_ctype_? I'm running the current tar files from the weekend before
last.
--Michael
------------------------------------------------------------------------------
Michael L. VanLoon -- michaelv@iastate.edu -- gg.mlv@isumvs.bitnet
Iowa State University of Science and Technology -- The way cool place to be!
Project Vincent Systems Staff, Iowa State University Computation Center
------------------------------------------------------------------------------
------------------------------------------------------------------------------