From ibemed at gmail.com Wed Oct 3 21:41:32 2007 From: ibemed at gmail.com (=?ISO-8859-1?Q?Ib=E9ria_Medeiros?=) Date: Thu, 4 Oct 2007 01:41:32 +0000 Subject: [splint-discuss] tainted analysis with splint Message-ID: <80bfbdd10710031841ve8a0182nefb98549e01e5b21@mail.gmail.com> Hi, i am trying make tainted analysis with splint, across extensible checking. My support for do that is the example tainted.mts (come with splint tool), where the principal purpose is detect format string bugs. My goal for tainted analysis is signalize every input variables, read across input functions, with tainted state. I create the attribute taintness (file .mts) and create the file .xh with every input functions, where i annotated every returned parameters with tainted annotation. For example, extern char *fgets (/*@returned@*/ char *s, int n, FILE *stream) /*@ensures tainted s@*/; in fgets function i ensure *s is tainted. My problem is how can i do that to function scanf or sscanf, where the returned parameter is ... (extern int scanf(const char *format, ...)) I have trying the next declaration, but splint give me a error extern int scanf(const char *format, ...) /*@ensures tainted ...@*/; any help, please regards -- Ib?ria Medeiros -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.cs.virginia.edu/pipermail/splint-discuss/attachments/20071004/bffbf9c5/attachment-0001.html From virtualspy3 at gmail.com Thu Oct 11 07:58:35 2007 From: virtualspy3 at gmail.com (Jack Sparrow) Date: Thu, 11 Oct 2007 10:58:35 -0400 Subject: [splint-discuss] splint usage Message-ID: <8c064ef30710110758m620164ebk89dea2e94eacb9a7@mail.gmail.com> Hi, I am new to splint and currently trying it on my source which also has a collection of independent libraries. When I try running splint : splint abc_main.c -I ${bca_project_path}/oss/src ${bca_project_path}/oss/h ${bca_project_path}/cd/h ${bca_project_path}/abc/h ${bac_project_path}/abc/bca/h ${bca_project_path}/abc/caldrv/h ${bca_project_path}/bsp/h ${bca_project_path}/sad/h ${abc_project_path}/lib /abc/xsgaag/com2/h ${bca_project_path}/cos/src +posixlib -preproc This is the output I get: Spec file not found: ../../oss/h.lcl Spec file not found: ../../cd/h.lcl Spec file not found: ../h.lcl Spec file not found: ../cdm/h.lcl Spec file not found: ../caldrv/h.lcl Spec file not found: ../../bsp/h.lcl Spec file not found: ../../sad/h.lcl Spec file not found: ../../lib.lcl Spec file not found: ../../com2/h.lcl Spec file not found: ../../com2/src.lcl Cannot open file: ../../oss/h.c Cannot open file: ../../cd/h.c Cannot open file: ../h.c Cannot open file: ../cdm/h.c Cannot open file: ../caldrv/h.c Cannot open file: ../../bsp/h.c Cannot open file: ../../sad/h.c Cannot open file: ../../lib.c Cannot open file: ../../com2/h.c Cannot open file: ../../com2/src.c abc_main.c:84:11: Parse Error. (For help on parse errors, see splint -help parseerrors.) *** Cannot continue. What seems to be the problem here? Am I missing some flag while invoking splint? Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.cs.virginia.edu/pipermail/splint-discuss/attachments/20071011/73460f8d/attachment.html From Peter.Chapin at vtc.vsc.edu Thu Oct 11 20:37:20 2007 From: Peter.Chapin at vtc.vsc.edu (Peter C. Chapin) Date: Thu, 11 Oct 2007 23:37:20 -0400 Subject: [splint-discuss] Problems finding standard.lcd Message-ID: <470EEBF0.6010506@vtc.vsc.edu> Hi! I'm using splint v3.1.1 on Windows. I realize Windows is not officially supported, but I'm hoping someone might have some insight into this issue anyway. I've installed splint to c:\lib\splint-3.1.1. I have the LARCH_PATH and LCLIMPORTDIR environment variables set appropriately. However, splint behaves as if it can't find standard.lcd. Specifically it acts as if it has no knowledge of the C standard library functions. If I manually copy c:\lib\splint-3.1.1\lib\standard.lcd to my working directory and use the "-load standard" command line option, things work as they should. This is an acceptable solution, although it is inelegant. If I delete standard.lcd from my working directory and try "-load c:\lib\spint-3.1.1\lib\standard" I get the error Cannot open dump file for loading: c:\lib\splint-3.1.1\lib\standard *** Cannot continue. I tried using forward slashes instead of backslashes and I tried deleting the drive specifier from the name. Neither of these approaches worked. Is this related to the non-support of Windows or am I just doing something stupid? Thanks! Peter P.S. I've just started using splint but it has already found a couple of issues in my code that I hadn't thought about. Cool. -------------- next part -------------- A non-text attachment was scrubbed... Name: Peter.Chapin.vcf Type: text/x-vcard Size: 308 bytes Desc: not available Url : http://www.cs.virginia.edu/pipermail/splint-discuss/attachments/20071011/133a5dda/attachment.vcf From Sebastian.Matuschka at gcd-solutions.de Thu Oct 11 23:18:08 2007 From: Sebastian.Matuschka at gcd-solutions.de (Matuschka, Sebastian) Date: Fri, 12 Oct 2007 08:18:08 +0200 Subject: [splint-discuss] Problems finding standard.lcd In-Reply-To: <470EEBF0.6010506@vtc.vsc.edu> References: <470EEBF0.6010506@vtc.vsc.edu> Message-ID: <49ED01FC03EE524BB7BB258E8F93BFF311CD5A@bfl-exchange-1.BFL.local> Hi, I'm using splint on windows too, and it works well. Maybe you have to restart your IDE or your PC so the environment variables are set and known correctly. That was my problem at the beginning. > -----Urspr?ngliche Nachricht----- > Von: splint-discuss-bounces at cs.virginia.edu [mailto:splint-discuss- > bounces at cs.virginia.edu] Im Auftrag von Peter C. Chapin > Gesendet: Freitag, 12. Oktober 2007 05:37 > An: Splint Discussion > Betreff: [splint-discuss] Problems finding standard.lcd > > Hi! I'm using splint v3.1.1 on Windows. I realize Windows is not > officially supported, but I'm hoping someone might have some insight > into this issue anyway. > > I've installed splint to c:\lib\splint-3.1.1. I have the LARCH_PATH and > LCLIMPORTDIR environment variables set appropriately. However, splint > behaves as if it can't find standard.lcd. Specifically it acts as if it > has no knowledge of the C standard library functions. > > If I manually copy c:\lib\splint-3.1.1\lib\standard.lcd to my working > directory and use the "-load standard" command line option, things work > as they should. This is an acceptable solution, although it is > inelegant. If I delete standard.lcd from my working directory and try > "-load c:\lib\spint-3.1.1\lib\standard" I get the error > > Cannot open dump file for loading: c:\lib\splint-3.1.1\lib\standard > *** Cannot continue. > > I tried using forward slashes instead of backslashes and I tried > deleting the drive specifier from the name. Neither of these approaches > worked. Is this related to the non-support of Windows or am I just doing > something stupid? > > Thanks! > > Peter > > P.S. I've just started using splint but it has already found a couple of > issues in my code that I hadn't thought about. Cool. From Sebastian.Matuschka at gcd-solutions.de Thu Oct 11 23:14:05 2007 From: Sebastian.Matuschka at gcd-solutions.de (Matuschka, Sebastian) Date: Fri, 12 Oct 2007 08:14:05 +0200 Subject: [splint-discuss] splint usage In-Reply-To: <8c064ef30710110758m620164ebk89dea2e94eacb9a7@mail.gmail.com> References: <8c064ef30710110758m620164ebk89dea2e94eacb9a7@mail.gmail.com> Message-ID: <49ED01FC03EE524BB7BB258E8F93BFF311CD58@bfl-exchange-1.BFL.local> Hi, you have a space after the -I flag, if you want to tell Splint where your Include directory is, you must type the path directly after the -I, no space or something else. Otherwise, like you typed it now, splint thinks those h things at the end of each path are files which should be checked and you forgot to add .c or .lcl, adds it and tries to open it. Best Regards Sebastian ________________________________ Von: splint-discuss-bounces at cs.virginia.edu [mailto:splint-discuss-bounces at cs.virginia.edu] Im Auftrag von Jack Sparrow Gesendet: Donnerstag, 11. Oktober 2007 16:59 An: splint-discuss at mail.cs.virginia.edu Betreff: [splint-discuss] splint usage Hi, I am new to splint and currently trying it on my source which also has a collection of independent libraries. When I try running splint : splint abc_main.c -I ${bca_project_path}/oss/src ${bca_project_path}/oss/h ${bca_project_path}/cd/h ${bca_project_path}/abc/h ${bac_project_path}/abc/bca/h ${bca_project_path}/abc/caldrv/h ${bca_project_path}/bsp/h ${bca_project_path}/sad/h ${abc_project_path}/lib /abc/xsgaag/com2/h ${bca_project_path}/cos/src +posixlib -preproc This is the output I get: Spec file not found: ../../oss/h.lcl Spec file not found: ../../cd/h.lcl Spec file not found: ../h.lcl Spec file not found: ../cdm/h.lcl Spec file not found: ../caldrv/h.lcl Spec file not found: ../../bsp/h.lcl Spec file not found: ../../sad/h.lcl Spec file not found: ../../lib.lcl Spec file not found: ../../com2/h.lcl Spec file not found: ../../com2/src.lcl Cannot open file: ../../oss/h.c Cannot open file: ../../cd/h.c Cannot open file: ../h.c Cannot open file: ../cdm/h.c Cannot open file: ../caldrv/h.c Cannot open file: ../../bsp/h.c Cannot open file: ../../sad/h.c Cannot open file: ../../lib.c Cannot open file: ../../com2/h.c Cannot open file: ../../com2/src.c abc_main.c:84:11: Parse Error. (For help on parse errors, see splint -help parseerrors.) *** Cannot continue. What seems to be the problem here? Am I missing some flag while invoking splint? Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.cs.virginia.edu/pipermail/splint-discuss/attachments/20071012/18b30be3/attachment.html From Peter.Chapin at vtc.vsc.edu Fri Oct 12 04:25:19 2007 From: Peter.Chapin at vtc.vsc.edu (Peter C. Chapin) Date: Fri, 12 Oct 2007 07:25:19 -0400 Subject: [splint-discuss] Problems finding standard.lcd In-Reply-To: <49ED01FC03EE524BB7BB258E8F93BFF311CD5A@bfl-exchange-1.BFL.local> References: <470EEBF0.6010506@vtc.vsc.edu> <49ED01FC03EE524BB7BB258E8F93BFF311CD5A@bfl-exchange-1.BFL.local> Message-ID: <470F599F.90608@vtc.vsc.edu> Matuschka, Sebastian wrote: > I'm using splint on windows too, and it works well. > Maybe you have to restart your IDE or your PC so the environment variables are set and known correctly. That was my problem at the beginning. > Thanks for your note. I don't think that's the problem because I installed splint some time ago; I've only just recently started a project using it. My machine has been rebooted several times since I did the install. I have since realized that I will probably have to create a local copy of standard.lcd anyway. I'm using OpenSSL in my project and I'll need to provide some annotations for the OpenSSL functions that I use. Thus I will need to compile a splint library for that purpose. I notice that splint only allows a single library to be loaded, so that means I'll need to merge the OpenSSL stuff into standard.h in order to compile them together. Consequently splint's troubles finding standard.lcd in the installation directories is moot for me now. Peter -------------- next part -------------- A non-text attachment was scrubbed... Name: Peter.Chapin.vcf Type: text/x-vcard Size: 308 bytes Desc: not available Url : http://www.cs.virginia.edu/pipermail/splint-discuss/attachments/20071012/5baad59b/attachment.vcf From Michael.Wojcik at MicroFocus.com Fri Oct 12 06:41:05 2007 From: Michael.Wojcik at MicroFocus.com (Michael Wojcik) Date: Fri, 12 Oct 2007 06:41:05 -0700 Subject: [splint-discuss] splint usage In-Reply-To: <49ED01FC03EE524BB7BB258E8F93BFF311CD58@bfl-exchange-1.BFL.local> References: <8c064ef30710110758m620164ebk89dea2e94eacb9a7@mail.gmail.com> <49ED01FC03EE524BB7BB258E8F93BFF311CD58@bfl-exchange-1.BFL.local> Message-ID: <11352F9641010A418AD5057945A3A6598B4764@MTV-EXCHANGE.microfocus.com> > From: splint-discuss-bounces at cs.virginia.edu [mailto:splint-discuss-bounces at cs.virginia.edu] On Behalf Of Matuschka, Sebastian > Sent: Friday, 12 October, 2007 02:14 > you have a space after the -I flag, if you want to tell Splint > where your Include directory is, you must type the path directly > after the -I, no space or something else. More specifically, that's "-I", no space, and the path *for each of your include directories*. What you have now is "-I", a space, and then a list of include directories separated by spaces. So what you want is something like: splint abc_main.c -I${bca_project_path}/oss/src \ -I${bca_project_path}/oss/h \ -I${bca_project_path}/cd/h ... -- Michael Wojcik Principal Software Systems Developer, Micro Focus From brosenth at comcast.net Fri Oct 12 07:58:15 2007 From: brosenth at comcast.net (brosenth at comcast.net) Date: Fri, 12 Oct 2007 14:58:15 +0000 Subject: [splint-discuss] Parsing errors Message-ID: <101220071458.7408.470F8B870004128900001CF02213575333089B020A9C019D0D@comcast.net> New to splint, so sorry if this post has already been addressed in the past. Trying to parse source that is kernel module source and am getting numerous parse errors. Specifically, I am trying to parse e.g. iptables code (actually, netfilter code) like ip_conntrack_proto_sctp.c from a LK 2.6.9-xx source. splint complains about not being able to parse things like __u32int and the like. Basically, about a dozen or so defines from /linux/types.h which is the first include in the source file noted above. I have created a .splintrc that I am populating with -Dxxx=yyy directives as these occur in running splint. Wound up with about 14 of these. Then, splint complains about not being able to parse the fs_struct.h which is an include in the sched.h Tried having -I directives in the command line like -I/usr/src/linux/include/linux/ and the like - still no go. Also tried +posixlib and +unixlib - still no go I gave up at this point. Doesn't seem like it should take this much effort but maybe it does. Or maybe I'm missing something more obvious. -- Bruce Rosenthal Chief Architect, TranStrophe Turning Information and Technology Into Business Opportunities 505 521 4879 510 432 7912 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.cs.virginia.edu/pipermail/splint-discuss/attachments/20071012/2c102d93/attachment.html From virtualspy3 at gmail.com Fri Oct 12 09:16:15 2007 From: virtualspy3 at gmail.com (Jack Sparrow) Date: Fri, 12 Oct 2007 12:16:15 -0400 Subject: [splint-discuss] Parse error: Message-ID: <8c064ef30710120916n67f5126aiecdd1569f9f9e64c@mail.gmail.com> Some of the code which I am testing using splint is giving me a parse error. I am running a linux-2.6.9 kernel: $splint abcd_main.cpp -I ${abc_project_path}/xx/h The output is: Splint 3.1.1 --- 15 Jun 2004 /usr/include/bits/sigthread.h:33:18: Parse Error: Inconsistent function parameter syntax: __sigset_t : . (For help on parse errors, see splint -help parseerrors.) *** Cannot continue. What seems to be the problem? Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.cs.virginia.edu/pipermail/splint-discuss/attachments/20071012/b777a5c6/attachment.html From virtualspy3 at gmail.com Mon Oct 15 07:43:43 2007 From: virtualspy3 at gmail.com (Jack Sparrow) Date: Mon, 15 Oct 2007 10:43:43 -0400 Subject: [splint-discuss] splint usage In-Reply-To: <11352F9641010A418AD5057945A3A6598B4764@MTV-EXCHANGE.microfocus.com> References: <8c064ef30710110758m620164ebk89dea2e94eacb9a7@mail.gmail.com> <49ED01FC03EE524BB7BB258E8F93BFF311CD58@bfl-exchange-1.BFL.local> <11352F9641010A418AD5057945A3A6598B4764@MTV-EXCHANGE.microfocus.com> Message-ID: <8c064ef30710150743k308538fax584b07a37e8f7f18@mail.gmail.com> Hi, Thanks for the comments, I got rid of the above error. However, I am now getting a parse error after running splint on the same se of source files, which says: usr/include/bits/sigthread.h:33:18: Parse Error: Inconsistent function parameter syntax: __sigset_t : . (For help on parse errors, see splint -help parseerrors.) This is after adding the following flags: -prepoc, -filextensions, +trytorecover, +posixlib. How can correct this error? Thanks. On 10/12/07, Michael Wojcik wrote: > > > > From: splint-discuss-bounces at cs.virginia.edu > [mailto:splint-discuss-bounces at cs.virginia.edu] On Behalf Of Matuschka, > Sebastian > > Sent: Friday, 12 October, 2007 02:14 > > > you have a space after the -I flag, if you want to tell Splint > > where your Include directory is, you must type the path directly > > after the -I, no space or something else. > > More specifically, that's "-I", no space, and the path *for each of your > include directories*. What you have now is "-I", a space, and then a > list of include directories separated by spaces. > > So what you want is something like: > > splint abc_main.c -I${bca_project_path}/oss/src \ > -I${bca_project_path}/oss/h \ > -I${bca_project_path}/cd/h ... > > -- > Michael Wojcik > Principal Software Systems Developer, Micro Focus > > _______________________________________________ > splint-discuss mailing list > splint-discuss at mail.cs.virginia.edu > http://www.cs.virginia.edu/mailman/listinfo/splint-discuss > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.cs.virginia.edu/pipermail/splint-discuss/attachments/20071015/12198ecf/attachment.html From Bob.van.der.Putten at KONE.com Mon Oct 22 01:20:22 2007 From: Bob.van.der.Putten at KONE.com (Putten Bob van der) Date: Mon, 22 Oct 2007 10:20:22 +0200 Subject: [splint-discuss] Output stream PSlint Message-ID: <950490263C4BD711B9E600096B717ECC0D353F4F@tnlnts10.nt.kone.com> When using -streamoverwrite +message-stream SplintResult.txt in C:\splint-3.1.1\bin\splint.exe *.c -nestcomment -preproc -streamoverwrite +message-stream SplintResult.txt I get an internal error: ....: *** Internal Bug at F:\splint\src\llmain.c(831): Files unclosed: 1 [errno: 2] *** Please report bug to splint-bug at splint.org *** How to write results of splint to an external file? With kind regards / Mit freundlichen Gr?ssen B.F.A. van der Putten Engineer D&D KONE Deursystemen BV Accustraat 21 3903 LX Veenendaal Postbus 94 3900 AB Veenendaal * Phone: +31 (0) 318 532 333 * Fax: +31 (0) 318 532 339 * Email: bob.van.der.putten at kone.com * Website: www.kone.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.cs.virginia.edu/pipermail/splint-discuss/attachments/20071022/4f73afcd/attachment.html