123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187 |
- uClibc thread-safety analysis
- By Steve Thayer <sthayer@coactive.com>
- with updates by Erik Andersen <andersee@debian.org>
- Introduction:
- The purpose of this document is to identify the things that need to be done
- to the uClibc C library in order to make it thread-safe. The goal is to be
- able to use a pthreads thread implementation under uClinux, using the uClibc
- C library. To help identify the things that require changing, I used David R.
- Butenhof's book Programming With POSIX Threads, the source code for the
- glibc 2.1.3 C library, and the source code for the C library included in the
- Proventhreads distribution.
- References:
- Butenhof, David R., Programming With POSIX Threads, Addison Wesley Longman, Inc., Reading, MA, ISBN 0-201-63392-2, 1997.
- The GNU C library is available from the Free Software Foundation
- http://www.gnu.org/software/libc/libc.html
- Proventhreads is part of the Inferno Operating system.
- http://www.vitanuova.com/inferno/index.html
- 1. Stdio:
- 1.1 Buffer access mutexes
- The following functions are required in order to protect shared
- I/O buffers from being accessed by more than one thread at a time.
- None of these functions are currently implemented in the uClibc
- library, so they must be added.
- flockfile <implemented>
- ftrylockfile <implemented>
- funlockfile <implemented>
- 1.2 Functions that must use buffer access mutexes, according to Butenhof
- The following functions are identified by Butenhof as needing to use
- buffer access mutexes. This does not represent all functions that
- need to use the mutexes.
- getc <mutex required>
- getchar <mutex required>
- putc <mutex required>
- putchar <mutex required>
- 1.3 Functions from glibc (libio) that use buffer access mutexes
- The following functions are functions found in glibc that currently
- use the buffer access mutexes. Comments in brackets represent
- status of uClibc with regard to these functions. Most of these
- functions aren't even supported under uClibc, so no work is required.
- The rest may require the access mutex. (These must be analyzed on a
- case-by-case basis.)
- clearerr <mutex required>
- feof <mutex required>
- ferror <mutex required>
- fputc <mutex required>
- fputwc <not supported>
- freopen <mutex required>
- freopen64 <mutex required>
- fseek <mutex required>
- fseeko <mutex required>
- fseeko64 <mutex required>
- ftello <mutex required>
- ftello64 <mutex required>
- fwide <not supported>
- getc <mutex required>
- getchar <mutex required>
- getwc <not supported>
- getwchar <not supported>
- iofclose <not supported>
- iofflush <not supported>
- iofgetpos <not supported>
- iofgetpos64 <not supported>
- iofgets <not supported>
- iofgetws <not supported>
- iofputs <not supported>
- iofputws <not supported>
- iofread <not supported>
- iofsetpos <not supported>
- iofsetpos64 <not supported>
- ioftell <not supported>
- iofwrite <not supported>
- iogetdelim <not supported>
- iogets <not supported>
- ioputs <not supported>
- ioseekoff <not supported>
- ioseekpos <not supported>
- iosetbuffer <not supported>
- iosetvbuf <not supported>
- ioungetc <not supported>
- ioungetwc <not supported>
- oldiofclose <not supported>
- oldiofgetpos <not supported>
- oldiofgetpos64 <not supported>
- oldiofsetpos <not supported>
- oldiofsetpos64 <not supported>
- peekc <not supported>
- putc <mutex required>
- putchar <mutex required>
- putwc <not supported>
- putwchar <not supported>
- rewind <mutex required>
- 1.4 Functions from Proventhreads that use buffer access mutexes
- See description above. This applies only to the C library included
- in the proventhreads distribution.
- clearerr <mutex required>
- fclose <mutex required>
- fflush <mutex required>
- fgetc <mutex required>
- __getc <not supported>
- fgetline <not supported>
- fgetpos <mutex required>
- fgetpos64 <mutex required>
- fgets <mutex required>
- fpurge <not supported>
- fputc <mutex required>
- __putc <not supported>
- fputs <mutex required>
- fread <mutex required>
- freopen <mutex required>
- fscanf <mutex required>
- fseek <mutex required>
- ftell <mutex required>
- fwalk <not supported>
- fwrite <mutex required>
- getc <mutex required>
- getchar <mutex required>
- putc <mutex required>
- putchar <mutex required>
- puts <mutex required>
- putw <mutex _not_ required>
- refill <not supported>
- rewind <mutex required>
- scanf <mutex required>
- setvbuf <mutex required>
- ungetc <mutex required>
- vfprintf <mutex required>
- vscanf <mutex required>
- 1.5 Unlocked buffer access
- These functions get used in situations where speed is important,
- and locking isn't necessary, or for use in a section of code that
- is already locked. For example, a for-loop that makes multiple calls
- to getc could make an exlicit call to flockfile outside the loop, and
- then use getc_unlocked within the loop for speed. That way, the lock
- only needs to be grabbed and released once, rather than for each call.
- getc_unlocked <implemented
- getchar_unlocked <implemented
- putc_unlocked <implemented
- putchar_unlocked <implemented
- 1.6 Additional unlocked calls made in glibc
- These are additional functions (not mentioned by Butenhof) that the
- glibc library uses for unlocked buffer access. Though not strictly
- necessary, these may be nice to have in uClibc.
- fileno_unlocked <implemented
- clearerr_unlocked <implemented
- feof_unlocked <implemented
- ferror_unlocked <implemented
- fputc_unlocked <implemented
- fgetc_unlocked <implemented
- fflush_unlocked <implemented
- fread_unlocked <implemented
- fwrite_unlocked <implemented
- fgets_unlocked <implemented
- fputs_unlocked <implemented
- 1.7 Additional unlocked calls made in Proventhreads
- Proventhreads only provides the four unlocked function calls above.
- <none>
- 2. Thread-safe functions:
- There are some functions in the C library standard that are
- simply not thread-safe and cannot be thread-safe using their
- current interface. For example, any function that returns a
- pointer to static data, or requires static context between
- calls. To resolve this problem, new functions were added to
- the standard that perform the same basic task, but use a new
- interface that does not require static data. These functions
- share their name with the old unsafe functions, but have an
- "_r" appended to the name. By definition, these functions are
- reentrant and thread-safe. It is important to note that these
- functions to do not depend on <pthread.h> and can be used even
- if threading is not supported.
- 2.1 User and terminal identification:
- getlogin_r <implemented>
- ctermid <implemented>
- ttyname_r <implemented>
- 2.2 Directory searching
- readdir_r <implemented>
- 2.3 String token
- strtok_r <implemented>
- 2.4 Time representation
- asctime_r <implemented>
- ctime_r <implemented>
- gmtime_r <implemented>
- localtime_r <implemented>
- 2.5 Random number generation
- rand_r <implemented
- 2.6 Group and user database
- getgrgid_r <required> <---
- getgrnam_r <required> <---
- getpwuid_r <implemented>
- getpwnam_r <implemented>
- 2.7 Additional thread-safe functions implemented by glibc
- The following is a list of additional functions implemented by glibc
- that also provide thread-safe functionality. Most of these functions
- are not supported by uClibc, so there is no need to implement the
- thread-safe version. Those that do apply, but have not been
- implemented yet are highlighted.
- fgetpwent_r <implemented>
- getttyname_r <not supported>
- getmntent_r <implemented>
- ecvt_r <not supported>
- fcvt_r <not supported>
- qecvt_r <not supported>
- qfcvt_r <not supported>
- hcreate_r <not supported>
- hdestroy_r <not supported>
- hsearch_r <not supported>
- getspent_r <implemented>
- getspnam_r <implemented>
- sgetspent_r <implemented>
- fgetspent_r <implemented>
- gethostbyaddr_r <implemented>
- gethostbyname2_r <implemented>
- gethostbyname_r <implemented>
- gethostent_r <desired> <---
- getnetbyaddr_r <desired> <---
- getnetent_r <desired> <---
- getnetbyname_r <desired> <---
- getprotobynumber_r <desired> <---
- getprotoent_r <desired> <---
- getprotobyname_r <desired> <---
- getservbyname_r <implemented>
- getservbyport_r <implemented>
- getservent_r <implemented>
- getrpcent_r <desired> <---
- getrpcbyname_r <desired> <---
- getrpcbynumber_r <implemented>
- ether_aton_r <not supported>
- ether_ntoa_r <not supported>
- getnetgrent_r <not supported>
- getaliasent_r <not supported>
- getaliasbyname_r <not supported>
- nscd_getpw_r <not supported>
- nscd_getgr_r <not supported>
- nscd_gethst_r <not supported>
- getutent_r <desired> <---
- getutent_r_unknown <not supported>
- getutid_r_unknown <not supported>
- getutline_r_unknown <not supported>
- getutid_r <desired> <---
- getutline_r <required> <---
- getutent_r_file <not supported>
- getutid_r_file <not supported>
- getutline_r_file <not supported>
- internal_getut_r <not supported>
- getutent_r_daemon <not supported>
- getutid_r_daemon <not supported>
- getutline_r_daemon <not supported>
- ptsname_r <not supported>
- __fgetpwent_r <not supported>
- __ttyname_r <not supported>
- __getmntent_r <not supported>
- __getspent_r <not supported>
- __getspnam_r <not supported>
- __sgetspent_r <not supported>
- __fgetspent_r <not supported>
- __gethostbyaddr_r <not supported>
- __gethostbyname2_r <not supported>
- __gethostbyname_r <not supported>
- __gethostent_r <not supported
- __getnetbyaddr_r <not supported>
- __getnetent_r <not supported>
- __getnetbyname_r <not supported>
- __getprotobynumber_r <not supported>
- __getprotoent_r <not supported>
- __getprotobyname_r <not supported>
- __getservbyname_r <not supported>
- __getservbyport_r <not supported>
- __getrpcent_r <not supported>
- __getservent_r <not supported>
- __getrpcbyname_r <not supported>
- __getrpcbynumber_r <not supported>
- __getnetgrent_r <not supported>
- __internal_getnetgrent_r <not supported>
- __getaliasent_r <not supported>
- __getaliasbyname_r <not supported>
- __nscd_getpwnam_r <not supported>
- __nscd_getpwuid_r <not supported>
- __nscd_getgrgid_r <not supported>
- __nscd_getgrnam_r <not supported>
- __nscd_gethostbyaddr_r <not supported>
- __nscd_gethostbyname2_r <not supported>
- __nscd_gethostbyname_r <not supported>
- __getutent_r <not supported>
- __getutid_r <not supported>
- __getutline_r <not supported>
- __ptsname_r <not supported>
- 2.8 Additional thread-safe functions implemented by Proventhreads
- See description above. This applies only to the C library included
- in the proventhreads distribution.
- inet_ntoa_r <implemented>
- gethostbyaddr_r <implemented>
- gethostbyname_r <implemented>
- gethostent_r <not supported>
- getnetbyaddr_r <desired> <---
- getnetbyname_r <desired> <---
- getnetent_r <desired> <---
- getprotobynumber_r <desired> <---
- getprotoent_r <desired> <---
- getprotobyname_r <desired> <---
- getservbyname_r <implemented>
- getservbyport_r <implemented>
- getservent_r <implemented>
- 3. List of functions in uClibc that use static data structures
- The following is a list of static data structures found in uClibc,
- and the functions that use them. In most cases, static data is not
- thread-safe, since multiple threads can access the same data at the
- same time. This is an attempt to identify all of the static data that
- is not considered thread-safe. Some of these problems will get
- resolved by the changes outlines above.
- crypt/crypt.c:
- static struct crypt_data __crypt_data;
- crypt <crypt_r implemented>
- setkey <setkey_r implemented>
- encrypt <encrypt_r implemented>
- --------------------------------------------------------------------
- crypt/des.c:
- static u_char inv_key_perm[64];
- static u_char inv_comp_perm[56];
- static u_char u_sbox[8][64];
- static u_char u_key_perm[56];
- static u_char un_pbox[32];
- static u_int32_t en_keysl[16], en_keysr[16];
- static u_int32_t de_keysl[16], de_keysr[16];
- static u_int32_t ip_maskl[8][256], ip_maskr[8][256];
- static u_int32_t fp_maskl[8][256], fp_maskr[8][256];
- static u_int32_t key_perm_maskl[8][128], key_perm_maskr[8][128];
- static u_int32_t comp_maskl[8][128], comp_maskr[8][128];
- static u_int32_t saltbits;
- __des_crypt_r <implemented badly!> <---
- This needs to be fixed to actually be reentrant. Right now it
- just fakes it, which is pretty lame.... All the above should be
- moved into a 'struct des_context' or some such...
- --------------------------------------------------------------------
- crypt/md5.c:
- static const char __md5__magic[];
- static const unsigned char __md5_itoa64[];
- __md5_crypt_r <implemented>
- No problems here...
-
- --------------------------------------------------------------------
- inet/addr.c:
- static char buf[16];
- inet_ntoa <implemented>
- inet_ntoa_r <implemented>
- --------------------------------------------------------------------
- inet/getnetent.c:
- static FILE *netf = NULL;
- static char line[BUFSIZ+1];
- static struct netent net;
- static char *net_aliases[MAXALIASES];
- setnetent <mutex required>
- endnetent <mutex required>
- getnetent <mutex required>
- getnetent_r <not implemented>
- NOTE: setnetent and endnetent are not implemented in glibc.
- --------------------------------------------------------------------
- inet/getproto.c:
- static FILE *protof = NULL;
- static char line[BUFSIZ+1];
- static struct protoent proto;
- static char *proto_aliases[MAXALIASES];
- static int proto_stayopen;
- setprotoent <mutex required>
- endprotoent <mutex required>
- getprotoent <mutex required>
- getprotoent_r <implemented>
- getprotobyname <implemented>
- getprotobyname_r <not implemented>
- getprotobynumber <implemented>
- getprotobynumber_r <not implemented>
- NOTE: setprotoent and endprotoent are not implemented in glibc.
- --------------------------------------------------------------------
- inet/getservice.c:
- static FILE *servf = NULL;
- static char line[BUFSIZ+1];
- static struct servent serv;
- static char *serv_aliases[MAXALIASES];
- static int serv_stayopen;
- setservent <mutex required>
- endservent <fix mutex required>
- getservent <mutex required>
- getservent_r <implemented>
- getservbyname <mutex required>
- getservbyname_r <implemented>
- getservbyport <mutex required>
- getservbyport_r <implemented>
- NOTE: setservent and endservent are not implemented in glibc.
- --------------------------------------------------------------------
- static struct hostent h;
- static char buf[xxx];
- gethostbyname <implemented>
- static struct hostent h;
- static char buf[xxx];
- gethostbyname2 <implemented>
- static struct hostent h;
- static char buf[xxx];
- gethostbyaddr <implemented>
- static int __stay_open;
- static FILE * __gethostent_fp;
- static struct hostent h;
- static char buf[xxx];
- gethostent <mutex required>
- sethostent <mutex required>
- endhostent <mutex required>
- --------------------------------------------------------------------
- inet/rpc/auth_none.c:
- static struct auth_ops ops
- static struct authnone_private
- authnone_create <fix required> <---
- authnone_marshal <fix required> <---
- NOTE: This file makes a lot of use of this static variable and
- also a global allocated authentication structure. Care should
- be taken in fixing this to make it thread-safe.
- --------------------------------------------------------------------
- inet/rpc/auth_unix.c:
- static struct auth_ops auth_unix_ops
- authunix_create <fix required> <---
- marshal_new_auth <fix required> <---
- NOTE: This file makes a lot of use of this static variable and
- also a global allocated authentication structure. Care should
- be taken in fixing this to make it thread-safe.
- --------------------------------------------------------------------
- inet/rpc/bindresvport.c:
- static short port;
- bindresvport <fix required> <---
- --------------------------------------------------------------------
- inet/rpc/clnt_perror.c:
- static char *buf;
- static struct rpc_errtab rpc_errlist[]
- static struct auth_errtab auth_errlist[]
- NOTE: These static structures all have #if 0 around them, so they
- do not get compiled in. Hopefully, we don't have to worry about
- them right now, but prehaps a comment should be added to the code
- indicating that it is not thread-safe.
- --------------------------------------------------------------------
- inet/rpc/clnt_raw.c:
- static struct clntraw_private
- static struct clnt_ops client_ops
-
- clntraw_create <fix required> <---
- clntraw_call <fix required> <---
- clntraw_freeres <fix required> <---
- NOTE: This file makes a lot of use of these static variables and
- also a global allocated client structure. Care should
- be taken in fixing this to make it thread-safe.
- --------------------------------------------------------------------
- inet/rpc/clnt_simple.c:
- static struct callrpc_private
- callrpc <fix required> <---
-
- --------------------------------------------------------------------
- inet/rpc/clnt_tcp.c:
- static struct clnt_ops tcp_ops
- clnttcp_create
- NOTE: This static structure is just a group of function pointers.
- It could probably be made const, but this might affect the function
- signature. This should be investigated further.
- --------------------------------------------------------------------
- inet/rpc/clnt_udp.c:
- static struct clnt_ops udp_ops
- clntudp_bufcreate
- NOTE: This static structure is just a group of function pointers.
- It could probably be made const, but this might affect the function
- signature. This should be investigated further.
- --------------------------------------------------------------------
- inet/rpc/getrpcent.c:
- static char RPCDB[] <fix desired> <---
- NOTE: This is okay, but should use the const keyword.
- --------------------------------------------------------------------
- inet/rpc/pmap_clnt.c:
- static struct timeval timeout <fix desired> <---
- static struct timeval tottimeout <fix desired> <---
- NOTE: These are okay, but should use the const keyword.
- --------------------------------------------------------------------
- inet/rpc/pmap_getport.c:
- static struct timeval timeout <fix desired> <---
- static struct timeval tottimeout <fix desired> <---
- NOTE: These are okay, but should use the const keyword.
- --------------------------------------------------------------------
- inet/rpc/pmap_rmt.c:
- static struct timeval timeout <fix desired> <---
- NOTE: This is okay, but should use the const keyword.
- --------------------------------------------------------------------
- inet/rpc/rpc_dtablesize.c:
- static int size;
- _rpc_dtablesize <fix required> <---
- --------------------------------------------------------------------
- inet/rpc/rpc_prot.c:
- static struct xdr_discrim reply_dscrm[3] <fix desired> <---
- NOTE: This is okay, but should use the const keyword.
- --------------------------------------------------------------------
- inet/rpc/svc.c:
- static SVCXPRT **xports;
- static SVCXPRT *xports[NOFILE];
- static struct svc_callout
- xprt_register <fix required> <---
- xprt_unregister <fix required> <---
- svc_getreqset <fix required> <---
- svc_register <fix required> <---
- svc_unregister <fix required> <---
- svc_callout <fix required> <---
- NOTE: This is intricate code, and care should be taken when making
- this thread-safe.
- --------------------------------------------------------------------
- inet/rpc/svc_auth.c:
- static struct svcauthsw <fix desired> <---
- NOTE: This is okay, but should use the const keyword.
- --------------------------------------------------------------------
- net/rpc/svc_raw.c:
- static struct svcraw_private
- static struct xp_ops server_ops
- svcraw_create <fix required> <---
- svcraw_recv <fix required> <---
- svcraw_reply <fix required> <---
- svcraw_getargs <fix required> <---
- svcraw_freeargs <fix required> <---
- NOTE: This is intricate code, and care should be taken when making
- this thread-safe.
- --------------------------------------------------------------------
- inet/rpc/svc_simple.c:
- static struct proglst
- static SVCXPRT *transp;
- registerrpc <fix required> <---
- universal <fix required> <---
- NOTE: This is intricate code, and care should be taken when making
- this thread-safe.
- --------------------------------------------------------------------
- inet/rpc/svc_tcp.c:
- static struct xp_ops svctcp_op
- static struct xp_ops svctcp_rendezvous_op
- svctcp_create <fix required> <---
- makefd_xprt <fix required> <---
- NOTE: This static structure is just a group of function pointers.
- It could probably be made const, but this might affect the function
- signature. This should be investigated further.
- static struct timeval wait_per_try
- readtcp <fix required> <---
- NOTE: This looks like a bug. This static timeout value is passed
- by reference to a select() call. According to the linux man page
- for select:
- "On Linux, timeout is modified to reflect the amount of
- time not slept; most other implementations do not do this.
- This causes problems both when Linux code which reads
- timeout is ported to other operating systems, and when
- code is ported to Linux that reuses a struct timeval for
- multiple selects in a loop without reinitializing it.
- Consider timeout to be undefined after select returns."
- Unless the implementation of select is different than that of Linux,
- this needs to be fixed!
- --------------------------------------------------------------------
- inet/rpc/svc_udp.c:
- static struct xp_ops svcudp_op <fix desired> (1)
- svcudp_bufcreate
- 1: This static structure is just a group of function pointers.
- It could probably be made const, but this might affect the function
- signature. This should be investigated further.
- --------------------------------------------------------------------
- inet/rpc/xdr.c:
- static char xdr_zero[BYTES_PER_XDR_UNIT] <fix desired> <---
- NOTE: This is okay, but should use the const keyword.
- static u_long crud[BYTES_PER_XDR_UNIT]
- NOTE: This looks like it doesn't matter what's in this array.
- --------------------------------------------------------------------
- inet/rpc/xdr_float.c:
- static struct sgl_limits <fix desired> <---
- static struct dbl_limits <fix desired> <---
- NOTE: These are okay, but should use the const keyword.
- --------------------------------------------------------------------
- inet/rpc/xdr_mem.c:
- static struct xdr_ops xdrmem_ops <fix desired> (1)
- xdrmem_create
- 1: This static structure is just a group of function pointers.
- It could probably be made const, but this might affect the function
- signature. This should be investigated further.
- --------------------------------------------------------------------
- inet/rpc/xdr_rec.c:
- static struct xdr_ops xdrrec_ops <fix desired> (1)
- xdrrec_create
- 1: This static structure is just a group of function pointers.
- It could probably be made const, but this might affect the function
- signature. This should be investigated further.
- --------------------------------------------------------------------
- inet/rpc/xdr_stdio.c:
- static struct xdr_ops xdrstdio_ops <fix desired> (1)
- xdrstdio_create
- 1: This static structure is just a group of function pointers.
- It could probably be made const, but this might affect the function
- signature. This should be investigated further.
- --------------------------------------------------------------------
- ld.so-1/d-link/boot1.c:
- static char *_dl_malloc_addr
- static char *_dl_mmap_zero
- static char *_dl_not_lazy
- static char *_dl_warn
- static char *_dl_trace_loaded_objects
- _dl_boot <fix required> <---
- _dl_malloc <fix required> <---
- _dl_fixup <fix required> <---
- These are all part of the shared library loader, and are not
- used by applications directly. Therefore, fixing these is not
- a high priority item.
-
- --------------------------------------------------------------------
- ld.so-1/d-link/readelflib1.c:
- static caddr_t _dl_cache_addr
- static size_t _dl_cache_size
- _dl_map_cache <fix required> <---
- _dl_unmap_cache <fix required> <---
- _dl_load_shared_library <fix required> <---
-
- These are all part of the shared library loader, and are not
- used by applications directly. Therefore, fixing these is not
- a high priority item.
-
- --------------------------------------------------------------------
- ld.so-1/d-link/string.h:
- static char local[22]
- _dl_simple_ltoa <fix required> <---
- _dl_simple_ltoahex <fix required> <---
- These are all part of the shared library loader, and are not
- used by applications directly. Therefore, fixing these is not
- a high priority item.
- --------------------------------------------------------------------
- ld.so-1/d-link/arm/elfinterp.c:
- static char *_dl_reltypes[] <fix desired> <---
- NOTE: This is okay, but should use the const keyword.
- --------------------------------------------------------------------
- ld.so-1/d-link/i386/elfinterp.c:
- static char *_dl_reltypes[] <fix desired> <---
- NOTE: This is okay, but should use the const keyword.
-
- These are all part of the shared library loader, and are not
- used by applications directly. Therefore, fixing these is not
- a high priority item.
- --------------------------------------------------------------------
- ld.so-1/d-link/m68k/elfinterp.c:
- static char *_dl_reltypes[] <fix desired> <---
- NOTE: This is okay, but should use the const keyword.
- These are all part of the shared library loader, and are not
- used by applications directly. Therefore, fixing these is not
- a high priority item.
- --------------------------------------------------------------------
- ld.so-1/d-link/sparc/elfinterp.c:
- static char *_dl_reltypes[] <fix desired> <---
- NOTE: This is okay, but should use the const keyword.
- These are all part of the shared library loader, and are not
- used by applications directly. Therefore, fixing these is not
- a high priority item.
- --------------------------------------------------------------------
- ld.so-1/libdl/dlib.c:
- static int dl_init
- _dlopen <fix required> <---
- static int __attribute__ ((unused)) foobar1 <fix required?> (1)
- NOTE: The comment for this says it all: "This is a real hack." ;-)
-
- static char *type[] <fix desired> <---
- NOTE: This is okay, but should use the const keyword.
- These are all part of the shared library loader, and are not
- used by applications directly. Therefore, fixing these is not
- a high priority item.
- --------------------------------------------------------------------
- ld.so-1/util/ldconfig.c:
- static header_t magic <fix desired> <---
- NOTE: This is okay, but should use the const keyword.
- static liblist_t *lib_head
- cache_dolib <fix required> <---
- cache_write <fix required> <---
-
- This is not actually part of the C library, and is not built by
- default, so fixing these is not a high priority item.
- --------------------------------------------------------------------
- misc/internals/tempname.c:
- static uint64_t value;
- __gen_tempname <no fix required>
- This is supposed to be random trash, so the more threading
- collisions the better...
- --------------------------------------------------------------------
- misc/locale/locale.c:
- static char C_LOCALE_NAME[]="C"; <fix desired> <---
- NOTE: This is okay, but should use the const keyword.
- static struct SAV_LOADED_LOCALE sav_loaded_locale [1]
- static struct SAV_LOADED_LOCALE * old_locale
- setlocale <fix required> <---
- NOTE: Can different threads use different locales? I don't see
- why not.
- --------------------------------------------------------------------
- misc/locale/localeconv.c:
- static struct lconv result;
- localeconv <fix required> <---
- NOTE: This function returns a pointer to a static data structure.
- static char *blank = ""; <fix desired> <---
- static char *decimal = "."; <fix desired> <---
- NOTE: These are okay, but should use the const keyword.
- --------------------------------------------------------------------
- misc/mntent/mntent.c:
- static char buff[MNTMAXSTR];
- static struct mntent mnt;
- getmntent <mutex required>
- getmntent_r <implemented>
- --------------------------------------------------------------------
- misc/regex/regex.c:
- static char re_syntax_table[CHAR_SET_SIZE];
- static int done = 0;
- init_syntax_table <fix required> <---
- static int debug;
- <several functions> <fix required> <---
- NOTE: This is used to turn on debugging, and is used in several
- functions. It will need to be fixed if you want differing debug
- levels per thread.
- static char reg_unset_dummy;
- <REG_UNSET...> <fix required> <---
- static fail_stack_type fail_stack;
- regex_compile <fix required> <---
- <FREE_VARIABLES> <fix required> <---
- <FAIL_STACK_EMPTY> <fix required> <---
- <FAIL_STACK_PTR_EMPTY> <fix required> <---
- <FAIL_STACK_FULL> <fix required> <---
- <INIT_FAIL_STACK> <fix required> <---
- <RESET_FAIL_STACK> <fix required> <---
- <DOUBLE_FAIL_STACK> <fix required> <---
- <PUSH_FAILURE_POINTER> <fix required> <---
- <PUSH_FAILURE_INT> <fix required> <---
- <PUSH_FAILURE_ELT> <fix required> <---
- <POP_FAILURE_POINTER> <fix required> <---
- <POP_FAILURE_INT> <fix required> <---
- <POP_FAILURE_ELT> <fix required> <---
- <REMAINING_AVAIL_SLOTS> <fix required> <---
- static int regs_allocated_size;
- regs_grow_registers <fix required> <---
- static register_info_type *reg_info;
- static register_info_type *reg_info_dummy;
- static unsigned failure_id;
- static struct re_pattern_buffer re_comp_buf;
- <too many to list> <fix required> <---
-
- NOTE: This is just a NASTY file for static variables. A lot of
- work needs to be done here to clean this up. But I'm not even
- sure if it matters. This code is taken directly from glibc.
- This code is also very large (adds over 30k to the C library
- all by itself). This file needs a complete rewrite.
- --------------------------------------------------------------------
- misc/syslog/syslog.c:
- static pthread_once__t _once_block = pthread_once_init;
- static pthread_mutex_t _syslog_mutex;
-
- NOTE: I think these are okay. ;-)
- static int LogFile = -1;
- static int connected;
- static int LogStat = 0;
- static int LogFacility = LOG_USER;
- static int LogMask = 0xff;
- static char truncate_msg[12]
- static struct sockaddr SyslogAddr;
- NOTE: These are already protected.
- --------------------------------------------------------------------
- misc/time/asctime.c:
- static char timebuf[26];
- asctime <asctime_r implemented>
- --------------------------------------------------------------------
- misc/time/ctime.c:
- static char cbuf[26];
- ctime <ctime_r implemented>
- --------------------------------------------------------------------
- misc/time/gmtime.c:
- static struct tm tmb;
- gmtime <gmtime_r implemented>
- --------------------------------------------------------------------
- misc/time/localtime.c:
- static struct tm tmb;
- localtime <localtime_r implemented>
- --------------------------------------------------------------------
- misc/time/mktime.c:
- static tz_rule tz_rules[2];
- tzset <fix required> <---
- static time_t localtime_offset;
- mktime <fix required> <---
- --------------------------------------------------------------------
- misc/time/tm_conv.c:
- static int moffset[] <fix desired> <---
-
- NOTE: This is okay, but should use the const keyword.
- --------------------------------------------------------------------
- misc/utmp/utent.c:
- static int static_fd = -1;
- static struct utmp static_utmp;
- static const char default_file_name[] = _PATH_UTMP;
- static const char *static_ut_name = (const char *) default_file_name;
- setutent <ok>
- endutent <ok>
- getutent <ok>
- getutid <ok>
- getutline <ok>
- pututline <ok>
- utmpname <ok>
- __getutent <ok>
- --------------------------------------------------------------------
- pwd_grp/__getgrent.c:
- static char line_buff[GR_MAX_LINE_LEN];
- static char *members[GR_MAX_MEMBERS];
- static char *line_buff = NULL;
- static char **members = NULL;
- static struct group group;
- __getgrent <fix required> <---
- --------------------------------------------------------------------
- pwd_grp/fgetpwent.c:
- static char line_buff[PWD_BUFFER_SIZE];
- static struct passwd pwd;
- fgetpwent <fgetpwent_r implemented>
- --------------------------------------------------------------------
- pwd_grp/getpwnam.c:
- static char line_buff[PWD_BUFFER_SIZE];
- static struct passwd pwd;
- getpwnam <getpwnam_r implemented>
- --------------------------------------------------------------------
- pwd_grp/getpwuid.c:
- static char line_buff[PWD_BUFFER_SIZE];
- static struct passwd pwd;
- getpwuid <getpwuid_r implemented>
- --------------------------------------------------------------------
- pwd_grp/grent.c:
- static int grp_fd = -1;
- setgrent <fix required> <---
- endgrent <fix required> <---
- getgrent <fix required> <---
- --------------------------------------------------------------------
- pwd_grp/pwent.c:
- static int pw_fd = -1;
- setpwent <fix required> <---
- endpwent <fix required> <---
- getpwent_r <fix required> <---
- NOTE: Yeah, this looks weird, but getpwent_r isn't completely
- thread-safe.
- static char line_buff[PWD_BUFFER_SIZE];
- static struct passwd pwd;
- getpwent <getpwent_r implemented> <---
- --------------------------------------------------------------------
- stdio/tmpnam.c:
- static char tmpnam_buffer[L_tmpnam];
- tmpnam <tmpnam_r implemented>
- --------------------------------------------------------------------
- stdlib/atexit.c:
- static vfuncp __atexit_table[__UCLIBC_MAX_ATEXIT];
- static int __atexit_count = 0;
- atexit_handler <fix required> <---
- atexit <fix required> <---
- --------------------------------------------------------------------
- stdlib/bsearch.c:
- static int _bsearch;
- bsearch <ok>
- --------------------------------------------------------------------
- stdlib/setenv.c:
- static char **last_environ;
- __add_to_environ <ok>
- unsetenv <ok>
- setenv <ok>
- clearenv <ok>
- putenv <ok>
- all ok now.
- --------------------------------------------------------------------
- stdlib/random.c:
- static long int seed1 = 1;
- static long int seed2 = 1;
- static long int seed3 = 1;
- random <fix required?> (1)
- srandom <fix required?> (1)
- 1: I'm not sure if it matters if these are static, since they
- are random number seeds. Who cares if more than one thread changes
- their value?
- --------------------------------------------------------------------
- stdlib/malloc/avlmacro.h
- static objname *__Avl_##objname##pr##_new_node;
- Avl_Tree_no_replace <fix required> <---
- NOTE: This will take a bit of study to figure out if it needs fixing.
- --------------------------------------------------------------------
- stdlib/malloc/malloc.c:
- //static mutex_t malloc_lock = MUTEX_INITIALIZER; <---
- NOTE: Basically, thread support in malloc is broken and must be
- fixed. It looks like the infrastructure is there, but more
- investigation is required.
- --------------------------------------------------------------------
- stdlib/malloc-930716/malloc.c:
- A bunch of stuff
-
- malloc <ok>
- realloc <ok>
- free <ok>
- etc <ok>
- --------------------------------------------------------------------
- string/strerror.c:
- static char retbuf[48];
- static char retbuf[33];
- strerror <fix required> <---
- strerror_r <fix required> <---
- --------------------------------------------------------------------
- string/strsignal.c:
- static char retbuf[28];
- strsignal <fix required> <---
- main <fix required> <---
- --------------------------------------------------------------------
- string/strtok.c:
- static char *save = 0;
- strtok <ok>
- strtok_r <ok>
- --------------------------------------------------------------------
- termios/tcgetsid.c:
- static int tiocgsid_does_not_work;
- tcgestsid <fix required> <---
- --------------------------------------------------------------------
- termios/ttyname.c:
- static char dev[] = "/dev";
- ttyname <fix desired> <---
- NOTE: This is okay, but should use the const keyword.
- static char name[NAME_MAX];
- ttyname <ttyname_r required> <---
- --------------------------------------------------------------------
- test/testsuite.h:
- static int failures
- error_msg <fix required> <---
- done_testing <fix required> <---
- init_testsuite <fix required> <---
-
- --------------------------------------------------------------------
- unistd/getopt.c:
- static int sp = 1;
- getopt <fix required> <---
-
- --------------------------------------------------------------------
- unistd/getpass.c:
- static char buf[PWD_BUFFER_SIZE];
- getpass <fix required> <---
-
- NOTE: This function returns a pointer to a static data structure.
- This seems like it requires an _r version of this function. Glibc
- does the same thing. Oops! So much for thread-safe glibc!
- --------------------------------------------------------------------
- unistd/gnu_getopt.c:
- static char *nextchar;
- static enum ordering;
- static int first_nonopt;
- static int last_nonopt;
- _getopt_initialize <fix required> <---
- _getopt_internal <fix required> <---
- exchange <fix required> <---
- static struct option long_options[] <fix desired> <---
- NOTE: This is okay, but should use the const keyword.
- --------------------------------------------------------------------
- unistd/sysconf.c:
- static long int ret_vals[_UCLIBC_SYSCONF_NUM_VALID_ARGS];
- find_or_add_in_table <fix required?> <---
- main <fix required?> <---
- NOTE: I'm not sure if this needs to be multi-threaded or not.
- --------------------------------------------------------------------
- unistd/sysconf_src.c:
- static long int ret_vals[_UCLIBC_SYSCONF_NUM_VALID_ARGS];
- find_or_add_in_table <fix required?> <---
- main <fix required?> <---
- NOTE: I'm not sure if this needs to be multi-threaded or not.
- --------------------------------------------------------------------
- unistd/sysconf_i386.c:
- static long int ret_vals[_UCLIBC_SYSCONF_NUM_VALID_ARGS];
- find_or_add_in_table <fix required?> <---
- main <fix required?> <---
- NOTE: I'm not sure if this needs to be multi-threaded or not.
- --------------------------------------------------------------------
- 4. List of functions that use global variables
- The following is a list of functions that make use of global
- variables. Since multiple threads can access the same global
- variable at the same time, access should be considered unsafe.
- This is an attempt to identify all the areas where global
- variables are used. This does not necessarily mean that each
- of these is unsafe. It just means that there is a potential
- for them to be unsafe. If this code never runs in more than
- one thread, then there's no problem. More ivestigation will be
- required to determine if changes are really required.
- Global variable:
- __environ (misc/internals/__uClibc_main.c)
- __uClibc_main.c:
- __uClibc_main <fix required?> (1)
- 1: This should only get executed once, so it is probably fine.
-
- stdlib/getenv.c:
- getenv <fix required> <---
- stdlib/putenv.c:
- putenv <fix required> <---
- stdlib/setenv.c:
- setenv <fix required> <---
- unsetenv <fix required> <---
- test/args/arg_test.c:
- main <fix required> <---
- unistd/execl.c:
- execl <fix required> <---
- unistd/execlp.c:
- execlp <fix required> <---
- unistd/execv.c:
- execv <fix required> <---
- unistd/execvp.c:
- execvep <fix required> <---
- --------------------------------------------------------------------
- Global variable:
- __uClibc_cleanup (misc/internals/__uClibc_main.c)
- stdlib/abort.c:
- abort <fix required> <---
- stdlib/atexit.c:
- atexit_handler <fix required> <---
- atexit <fix required> <---
- exit <fix required> <---
- NOTE: Not sure if multiple threads can be in this code or not.
- --------------------------------------------------------------------
- Global variable:
- environ (misc/internals/__uClibc_main.c)
- NOTE: This is a weak alias for __environ, but it doesn't ever get
- used in the uClibc library.
- --------------------------------------------------------------------
- Global variable:
- timezone (misc/time/tm_conv.c)
- misc/time/tm_conv.c:
- __tm_conv <fix required> <---
- --------------------------------------------------------------------
- Global variable:
- re_max_failures (misc/regex/regex.c)
- misc/regex/regex.c:
- DOUBLE_FAIL_STACK <fix required> <---
- regex_compile <fix required> <---
- --------------------------------------------------------------------
- Global variable:
- re_syntax_options (misc/regex/regex.c)
- misc/regex/regex.c:
- re_set_syntax <fix required> <---
- re_compile_pattern <fix required> <---
- re_comp <fix required> <---
- --------------------------------------------------------------------
- Global variable:
- __IO_list (stdio/stdio.c)
- stdio/stdio.c:
- fflush <fix required> <---
- __fopen <fix required> <---
- fclose <fix required> <---
- --------------------------------------------------------------------
- Global variable:
- _fixed_buffers (stdio/stdio.c)
- stdio/stdio.c:
- _alloc_stdio_buffer <fix required> <---
- _free_stdio_buffer_of_file <fix required> <---
- __init_stdio <fix required> <---
-
- --------------------------------------------------------------------
- Global variable:
- _free_buffer_index (stdio/stdio.c)
- stdio/stdio.c:
- _alloc_stdio_buffer <fix required> <---
- _free_stdio_buffer_of_file <fix required> <---
- __init_stdio <fix required> <---
- --------------------------------------------------------------------
- Global variable:
- _free_file_list (stdio/stdio.c)
- stdio/stdio.c:
- __init_stdio <fix required> <---
- _alloc_stdio_stream <fix required> <---
- _free_stdio_stream <fix required> <---
- --------------------------------------------------------------------
- Global variable:
- _stderr (stdio/stdio.c)
- ld.so-1/util/ldconfig.c:
- warn <fix required> <---
- error <fix required> <---
- usage <fix required> <---
- ld.so-1/util/ldd.c:
- warn <fix required> <---
- error <fix required> <---
- is_bin <fix required> <---
- main <fix required> <---
-
- misc/locale/locale.c:
- setlocale <fix required> <---
-
- misc/regex/regex.c:
- printchar <fix required> <---
- stdio/perror.c:
- perror <fix required> <---
- stdlib/malloc/alloc.c:
- calloc_dbg <fix required> <---
- malloc_dbg <fix required> <---
- free_dbg <fix required> <---
- stdlib/malloc/malloc.c:
- __hunk_alloc <fix required?> (1)
- __malloc_init <fix required?> (1)
- malloc <fix required?> (1)
- 1: These are commented out with C++ style comments.
- stdlib/malloc-simple/alloc.c:
- calloc_dbg <fix required> <---
- malloc_dbg <fix required> <---
- free_dbg <fix required> <---
- string/strsignal.c:
- psignal <fix required> <---
- test/args/arg_test.c:
- main <fix required> <---
- test/assert/assert.c:
- main <fix required> <---
- unistd/getopt.c:
- Err <fix required> <---
- unistd/getpass.c:
- getpass <fix required> <---
- unistd/gnu_getopt.c:
- _getopt_internal <fix required> <---
- unistd/sysconf.c:
- main <fix required> <---
- unistd/sysconf_src.c:
- main <fix required> <---
- unistd/sysconf_i386.c:
- main <fix required> <---
- --------------------------------------------------------------------
- Global variable:
- _stdin (stdio/stdio.c)
- include/stdio.h:
- getchar <fix required> <---
- include/bits/stdio.h:
- getchar <fix required> <---
- getchar_unlocked <fix required> <---
- stdio/scanf.c:
- scanf <fix required> <---
- vscanf <fix required> <---
- stdio/stdio.c
- gets <fix required> <---
- getchar <fix required> <---
- sysdeps/linux/i386/bits/stdio.h:
- getchar <fix required> <---
- getchar_unlocked <fix required> <---
- sysdeps/linux/m68k/bits/stdio.h:
- getchar <fix required> <---
- getchar_unlocked <fix required> <---
- sysdeps/linux/sh/bits/stdio.h:
- getchar <fix required> <---
- getchar_unlocked <fix required> <---
- sysdeps/linux/sparc/bits/stdio.h:
- getchar <fix required> <---
- getchar_unlocked <fix required> <---
- unistd/getpass.c:
- getpass <fix required> <---
- --------------------------------------------------------------------
- Global variable:
- _stdio_streams (stdio/stdio.c)
- stdio/stdio.c:
- __init_stdio <fix required> <---
- _free_stdio_stream <fix required> <---
- --------------------------------------------------------------------
- Global variable:
- _stdout (stdio/stdio.c)
- include/stdio.h:
- putchar <fix required> <---
- include/bits/stdio.h:
- vprintf <fix required> <---
- putchar <fix required> <---
- putchar_unlocked <fix required> <---
- ld.so-1/util/ldconfig.c:
- warn <fix required> <---
- error <fix required> <---
- ld.so-1/util/ldd.c:
- warn <fix required> <---
- error <fix required> <---
- main <fix required> <---
- stdio/printf.c:
- printf <fix required> <---
- vprintf <fix required> <---
- stdio/stdio.c:
- puts <fix required> <---
- _uClibc_fread <fix required> <---
- putchar <fix required> <---
- sysdeps/linux/i386/bits/stdio.h:
- vprintf <fix required> <---
- putchar <fix required> <---
- putchar_unlocked <fix required> <---
- sysdeps/linux/m68k/bits/stdio.h:
- vprintf <fix required> <---
- putchar <fix required> <---
- putchar_unlocked <fix required> <---
- sysdeps/linux/sh/bits/stdio.h:
- vprintf <fix required> <---
- putchar <fix required> <---
- putchar_unlocked <fix required> <---
- sysdeps/linux/sparc/bits/stdio.h:
- vprintf <fix required> <---
- putchar <fix required> <---
- putchar_unlocked <fix required> <---
- test/pwd_grp/test_grp.c:
- main <fix required> <---
- test/pwd_grp/test_pwd.c:
- main <fix required> <---
- --------------------------------------------------------------------
- Global variable:
- dns_caught_signal (inet/resolv.c)
- inet/resolv.c:
- dns_catch_signal <fix required> <---
- dns_lookup <fix required> <---
- --------------------------------------------------------------------
- Global variable:
- nameserver (inet/resolv.c)
- nameservers (inet/resolv.c)
- inet/resolv.c:
- open_nameservers <fix required> <---
- close_nameservers <fix required> <---
- resolve_name <fix required> <---
- gethostbyname <fix required> <---
- res_query <fix required> <---
- gethostbyaddr <fix required> <---
-
- --------------------------------------------------------------------
- Global variable:
- searchdomain (inet/resolv.c)
- searchdomains (inet/resolv.c)
- inet/resolv.c:
- dns_lookup <fix required> <---
-
- --------------------------------------------------------------------
- Global variable:
- _net_stayopen (inet/getnetent.c)
- inet/getnetbyad.c:
- getnetbyaddr <fix required> <---
- inet/getnetbynm.c:
- getnetbyname <fix required> <---
- inet/getnetent.c:
- setnetent <fix required> <---
- endnetent <fix required> <---
-
- --------------------------------------------------------------------
- Global variable:
- rpcdata (inet/rpc/getrpcent.c)
- inet/rpc/getrpcent.c:
- _rpcdata <fix required> <---
- --------------------------------------------------------------------
- Global variable:
- _null_auth (inet/rpc/rpc_commondata.c) <fix desired> <---
- NOTE: _null_auth is never actually initialized. It never gets written,
- only read. So it should be thread safe. But it should be declared
- as a const if that is the case. It should also be initialized.
- inet/rpc/auth_none.c:
- authnone_create
- inet/rpc/auth_unix.c:
- authunix_create
- inet/rpc/clnt_raw.c:
- clntraw_call
- inet/rpc/clnt_tcp.c:
- clnttcp_call
- inet/rpc/clnt_udp.c:
- clntudp_call
- inet/rpc/pmap_rmt.c:
- clnt_broadcast
- inet/rpc/svc_auth.c:
- _authenticate
- inet/rpc/svc_tcp.c:
- svctcp_create
- --------------------------------------------------------------------
- Global variable:
- rpc_createerr (inet/rpc/rpc_commondata.c)
- inet/rpc/clnt_generic.c:
- clnt_create <fix required> <---
-
- inet/rpc/clnt_perror.c:
- clnt_spcreateerror <fix desired?> <---
- NOTE: This piece of code has an "#if 0" around it.
- inet/rpc/clnt_simple.c:
- callrpc <fix required> <---
- inet/rpc/clnt_tcp.c:
- clnttcp_create <fix required> <---
- inet/rpc/clnt_udp.c:
- clntudp_bufcreate <fix required> <---
- inet/rpc/pmap_getport.c:
- pmap_getport <fix required> <---
- --------------------------------------------------------------------
- Global variable:
- svc_fdset (inet/rpc/rpc_commondata.c)
- inet/rpc/svc.c:
- xprt_register <fix required> <---
- xprt_unregister <fix required> <---
- svc_getreq <fix required> <---
- inet/rpc/svc_run.c:
- svc_run <fix required> <---
- NOTE: Be careful to also fix the uses of the "svc_fds" #define.
- --------------------------------------------------------------------
- Global variable:
- pl (inet/rpc/svc_simple.c)
- registerrpc <fix required> <---
- NOTE: proglst is set up to point at pl, so it needs fixing as well.
- (See proglst earlier in this document.)
- --------------------------------------------------------------------
- Global variable:
- _sigintr (signal/signal.c)
- signal/bsd_sig.c:
- __bsd_signal <fix required> <---
- signal/sigintr.c:
- siginterrupt <fix required> <---
- --------------------------------------------------------------------
- Global variable:
- __Avl_Block_tfree_mem_tree (stdlib/malloc/malloc.c)
- stdlib/malloc/malloc.c:
- __free_mem_del_block <fix required> <---
- bl_alloc <fix required> <---
- __malloc_init <fix required> <---
- NOTE: This code is very tricky stuff.
- --------------------------------------------------------------------
- Global variable:
- __Avl_Block_tptrs_tree (stdlib/malloc/malloc.c)
- stdlib/malloc/malloc.c:
- __bl_free <fix required> <---
- __malloc_init <fix required> <---
- free <fix required> <---
- _realloc_no_move <fix required> <---
- realloc <fix required> <---
- --------------------------------------------------------------------
- Global variable:
- __bl_last (stdlib/malloc/malloc.c)
- stdlib/malloc/malloc.c:
- COMBINE_BLOCKS <fix required> <---
- SPLIT_BLOCK <fix required> <---
- bl_mapnew <fix required> <---
- bl_alloc <fix required> <---
- __malloc_init <fix required> <---
-
- --------------------------------------------------------------------
- Global variable:
- __free_h (stdlib/malloc/malloc.c)
- stdlib/malloc/malloc.c:
- __hunk_alloc <fix required> <---
- __hunk_free <fix required> <---
- __malloc_init <fix required> <---
-
- --------------------------------------------------------------------
- Global variable:
- __malloc_initialized (stdlib/malloc/malloc.c)
- stdlib/malloc/malloc.c:
- __malloc_init <fix required> <---
- malloc <fix required> <---
- free <fix required> <---
- _realloc_no_move <fix required> <---
-
- --------------------------------------------------------------------
- Global variable:
- __total_h (stdlib/malloc/malloc.c)
- stdlib/malloc/malloc.c:
- __hunk_alloc <fix required> <---
- __malloc_init <fix required> <---
-
- --------------------------------------------------------------------
- Global variable:
- errno (sysdeps/linux/common/errno.c)
- sysdeps/linux/common/errno.c:
- __errno_location <fix required> <---
- NOTE: Obviously, errno gets used all over the place. I won't list
- them all here.
- --------------------------------------------------------------------
- Global variable:
- ___brk_addr (sysdeps/linux/i386/__init_brk.c)
- sysdeps/linux/i386/__init_brk.c:
- __init_brk <fix required> <---
- sysdeps/linux/i386/brk.c:
- brk <fix required> <---
- sysdeps/linux/i386/sbrk.c:
- sbrk <fix required> <---
- --------------------------------------------------------------------
- Global variable:
- optarg (unistd/getopt_vars.c)
- extra/locale/gen_ctype_from_glibc.c:
- main <fix required?> (1)
- ld.so-1/util/ldconfig.c:
- main <fix required?> (1)
- unistd/getopt.c:
- getopt <fix required> <---
- unistd/gnu_getopt.c:
- _getopt_internal <fix required> <---
- main <fix required?> (1)
- 1: Probably not required unless this program is run on multiple
- threads.
- --------------------------------------------------------------------
- Global variable:
- opterr (unistd/getopt_vars.c)
- ld.so-1/util/ldconfig.c:
- main <fix required?> (1)
- unistd/getopt.c:
- Err <fix required> <---
- getopt <fix required> <---
- unistd/gnu_getopt.c:
- _getopt_internal <fix required> <---
- 1: Probably not required unless this program is run on multiple
- threads.
- --------------------------------------------------------------------
- Global variable:
- optind (unistd/getopt_vars.c)
- extra/locale/gen_ctype_from_glibc.c:
- main <fix required?> (1)
-
- ld.so-1/util/ldconfig.c:
- main <fix required?> (1)
- ld.so-1/util/ldd.c:
- main <fix required?> (1)
-
- unistd/getopt.c:
- Err <fix required> <---
- getopt <fix required> <---
- unistd/gnu_getopt.c:
- exchange <fix required> <---
- _getopt_initialize <fix required> <---
- _getopt_internal <fix required> <---
- main <fix required?> (1)
- main (2nd one) <fix required?> (1)
- 1: Probably not required unless this program is run on multiple
- threads.
- --------------------------------------------------------------------
- Global variable:
- optopt (unistd/getopt_vars.c)
- unistd/getopt.c:
- Err <fix required> <---
- getopt <fix required> <---
- unistd/gnu_getopt.c:
- _getopt_internal <fix required> <---
|