From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,6ef3f9106d28ba77,start X-Google-Attributes: gidfee84,public From: jkb@mrc-lmb.cam.ac.uk (James Bonfield) Subject: Atom bugs Date: 1997/08/14 Message-ID: <5svf0j$78h$1@lyra.csx.cam.ac.uk>#1/1 X-Deja-AN: 264660767 Distribution: world Organization: MRC Laboratory of Molecular Biology, Cambridge UK Newsgroups: comp.unix.osf.osf1 I'm trying desperately to get atom+third degree to work reliably on pretty much anything I try. I'm using Digital Unix V4.0, with third degree v 4.2. I have the following code - part of tcl8.0: int Tcl_GetBoolean(interp, string, boolPtr) Tcl_Interp *interp; /* Interpreter used for error reporting. */ char *string; /* String containing a boolean number * specified either as 1/0 or true/false or * yes/no. */ int *boolPtr; /* Place to store converted result, which * will be 0 or 1. */ { int i; char lowerCase[10], c; size_t length; /* * Convert the input string to all lower-case. */ for (i = 0; i < 9; i++) { c = string[i]; if (c == 0) { break; } if ((c >= 'A') && (c <= 'Z')) { c += (char) ('a' - 'A'); } lowerCase[i] = c; } lowerCase[i] = 0; /* line 295 */ When running "atom wish -tool third", and then wish.third -f ../library/demos/widget.tcl (and then quitting it), I get in wish.3log: ---------------------------------------------------------------- rus -- 0 -- ./../generic/tclGet.c: 295: reading uninitialized local variable lowerCase + 1 bytes of Tcl_GetBoolean Tcl_GetBoolean wish, tclGet.c, line 295 DoConfig wish, tkConfig.c, line 347 (etc) Now I'm _sure_ this can't be true. Firstly, it's an assignment to lowerCase[i], not a read. And secondly, 'i' can only ever be in the range of 0 to 9 inclusive, which is inside the array boundaries. Am I doing something wrong or is atom acting buggily? If so, is there a known fix? Thanks in advance, James -- James Bonfield (jkb@mrc-lmb.cam.ac.uk) Tel: 01223 402499 Fax: 01223 213556 Medical Research Council - Laboratory of Molecular Biology, Hills Road, Cambridge, CB2 2QH, England. Also see Staden Package WWW site at http://www.mrc-lmb.cam.ac.uk/pubseq/