From raeburn at raeburn.org Tue Apr 1 17:14:42 2003 From: raeburn at raeburn.org (Ken Raeburn) Date: Wed Mar 22 17:10:04 2006 Subject: [splint-discuss] Return by value and error codes In-Reply-To: <1048584465.16215.22.camel@scary.honest.gov> (Richard Boulton's message of "25 Mar 2003 09:27:45 +0000") References: <1048584465.16215.22.camel@scary.honest.gov> Message-ID: Richard Boulton writes: > The implementation of make_new_foo is such that either a new foo object > is returned in res and the return value is 0, or (on error) *res is set > to NULL and a non-zero value is returned. This comes up every once in a while, and tends not to get any actual discussion. Near as I can tell, there is no way to tell Splint that the behavior of a function -- or rather, the annonation of one output parameter -- is one of two possibilities depending on the return value. (Swap "output parameter" and "return value" around as appropriate for your API.) This is why using Splint on programs that call realloc can be a hassle, too; there's no way to say, "this storage is released, unless the function returns a null pointer, in which case it's returned unchanged", which is how the pointer parameter should be described. I suggested a little while back that the manual be updated to describe some things Splint can't do right now, and possible ways to work around certain cases. You might be able to use /*@relnull@*/ to relax the null pointer checks for the returned pointer. If you want strict null pointer checking, the simplest way to deal with your situation is probably to have callers check the pointer, rather than the error code, to see whether the function succeeded. > Can anyone suggest a suitable annotation to describe this situation to > splint? Apparently not. :-( Ken From tempest at triconet.co.za Thu Apr 3 13:53:18 2003 From: tempest at triconet.co.za (M Tempest) Date: Wed Mar 22 17:10:04 2006 Subject: [splint-discuss] Undocumented features Message-ID: <001901c2fa13$0993d0c0$99b4ef9b@user4fjyoqudzq> Hello I'm using Splint 3.0.1.6. I would like to know when the next official release of Splint will be available (I think that would be 3.0.1.7?). The documentation for 3.0.1.6 states that it is an Alpha version, and that the documentation is therefore lagging behind. This is fine, but I would like to know where I can find out about these intentional (but undocumented) features. Thank you Michael -- How much hedge would a hedgehog hog if a hedgehog could hog hedge? From evans at cs.virginia.edu Thu Apr 3 14:56:40 2003 From: evans at cs.virginia.edu (David Evans) Date: Wed Mar 22 17:10:04 2006 Subject: [splint-discuss] Undocumented features In-Reply-To: <001901c2fa13$0993d0c0$99b4ef9b@user4fjyoqudzq> References: <001901c2fa13$0993d0c0$99b4ef9b@user4fjyoqudzq> Message-ID: Which documentation are you referring to? The Splint Manual at http://www.splint.org/manual/ is up-to-date (at least its meant to be!) with what is implemented in 3.0.1.6. There are a few undocumented flags (but they are intended just for our own testing and debugging.) You can access the current development code through sourceforge CVS, but that is not necessarily stable and may not have up to date documentation. There will be a new release available sometime hopefully fairly soon, but we can't make any promises about a specific release date. --- Dave On Thu, 3 Apr 2003, M Tempest wrote: > Hello > > I'm using Splint 3.0.1.6. > > I would like to know when the next official release of Splint will be > available (I think that would be 3.0.1.7?). > > The documentation for 3.0.1.6 states that it is an Alpha version, and that > the documentation is therefore lagging behind. This is fine, but I would > like to know where I can find out about these intentional (but undocumented) > features. > > Thank you > Michael > -- > How much hedge would a hedgehog hog if a hedgehog could hog hedge? > > _______________________________________________ > splint-discuss mailing list > splint-discuss@cs.virginia.edu > http://www.splint.org/mailman/listinfo/splint-discuss > From sidprice at softtools.com Thu Apr 3 15:25:21 2003 From: sidprice at softtools.com (Sid Price) Date: Wed Mar 22 17:10:04 2006 Subject: [splint-discuss] File and path names under Windows Message-ID: <01a501c2fa1f$2862d0d0$27cfed89@sc021077> I asked this question a week or so ago and did not get any response. When I set up include file paths Splint seems not to like paths with spaces, is this correct? If so is there a way around it? Thanks Sid. ---------------------------------------- Sid Price's Software Tools http://www.softtools.com ----------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.cs.Virginia.EDU/pipermail/splint-discuss/attachments/20030403/bb360ca4/attachment.htm From stephane.martin at ca.kontron.com Thu Apr 3 15:37:01 2003 From: stephane.martin at ca.kontron.com (=?iso-8859-1?Q?=22Martin=2C_St=E9phane=22?=) Date: Wed Mar 22 17:10:04 2006 Subject: [splint-discuss] File and path names under Windows Message-ID: <5009AD9521A8D41198EE00805F85F18F03AEC67B@sembo111.teknor.com> > I asked this question a week or so ago and did not get any response. When I set up include file paths Splint seems not to like paths ? > with spaces, is this correct? If so is there a way around it? > I don't know about space within the path but beware of CAP letter. It seems Splint come from the UNIX family and will differentiate path with same name and CAP lettre. I had this problem within my project. From cbfalconer at yahoo.com Thu Apr 3 18:35:30 2003 From: cbfalconer at yahoo.com (CBFalconer) Date: Wed Mar 22 17:10:04 2006 Subject: [splint-discuss] File and path names under Windows References: <01a501c2fa1f$2862d0d0$27cfed89@sc021077> Message-ID: <3E8CC542.57399739@yahoo.com> > Sid Price wrote: > > I asked this question a week or so ago and did not get any > response. When I set up include file paths Splint seems not to > like paths with spaces, is this correct? If so is there a way > around it? Don't use spaces in file and/or directory names. If you must, you can use underscores and hyphens without ill effects. If you are stuck with some of the foul Microsoft paths, consider using the SUBST command to create a phony drive letter in your autoexec.bat. This should use the 8.3 version of the path names. For example, I avoid the VC6 path problem with: Rem shorten paths subst v: c:\progra~1\micros~3 set basepath=c:\windows;c:\windows\command Rem Visual Studio set vccommon=v:\common\msdev98\bin Rem Visual C set vcpath=v:\vc98\bin;%vccommon% set vcinclude=v:\vc98\include set vclibs=v:\vc98\lib Note that "c:\progra~1\micros~3" is whatever the VC install has created for "c:\program files\microsoft visual studio", which is not usable at boot time. This is under W98. You will get generally better results if you refrain from using HTML in e-mail. I would ordinarily simply discard your query without reading it. Probably did. -- Chuck F (cbfalconer@yahoo.com) (cbfalconer@worldnet.att.net) Available for consulting/temporary embedded and systems. USE worldnet address! From sidprice at softtools.com Thu Apr 3 21:02:06 2003 From: sidprice at softtools.com (Sid Price) Date: Wed Mar 22 17:10:05 2006 Subject: [splint-discuss] File and path names under Windows References: <01a501c2fa1f$2862d0d0$27cfed89@sc021077> <3E8CC542.57399739@yahoo.com> Message-ID: <034a01c2fa4e$32253ed0$27cfed89@sc021077> Thanks for the heads-up on HTML, I am using a news reader at a clients office and it was set up that way, sorry. The news about spaces in paths is disappointing, these projects are large and have many folder names that are both long and/or with spaces. Which means that Splint is not going to be adopted. Thanks for the response, Sid. ---------------------------------------- Sid Price's Software Tools http://www.softtools.com ----------------------------------------- ----- Original Message ----- From: "CBFalconer" To: "Sid Price" ; Sent: Thursday, April 03, 2003 3:35 PM Subject: Re: [splint-discuss] File and path names under Windows > > Sid Price wrote: > > > > I asked this question a week or so ago and did not get any > > response. When I set up include file paths Splint seems not to > > like paths with spaces, is this correct? If so is there a way > > around it? > > Don't use spaces in file and/or directory names. If you must, you > can use underscores and hyphens without ill effects. > > If you are stuck with some of the foul Microsoft paths, consider > using the SUBST command to create a phony drive letter in your > autoexec.bat. This should use the 8.3 version of the path names. > For example, I avoid the VC6 path problem with: > > Rem shorten paths > subst v: c:\progra~1\micros~3 > set basepath=c:\windows;c:\windows\command > > Rem Visual Studio > set vccommon=v:\common\msdev98\bin > > Rem Visual C > set vcpath=v:\vc98\bin;%vccommon% > set vcinclude=v:\vc98\include > set vclibs=v:\vc98\lib > > Note that "c:\progra~1\micros~3" is whatever the VC install has > created for "c:\program files\microsoft visual studio", which is > not usable at boot time. This is under W98. > > You will get generally better results if you refrain from using > HTML in e-mail. I would ordinarily simply discard your query > without reading it. Probably did. > > -- > Chuck F (cbfalconer@yahoo.com) (cbfalconer@worldnet.att.net) > Available for consulting/temporary embedded and systems. > USE worldnet address! > > > _______________________________________________ > splint-discuss mailing list > splint-discuss@cs.virginia.edu > http://www.splint.org/mailman/listinfo/splint-discuss > From wbriscoe at ponle.demon.co.uk Fri Apr 4 02:30:22 2003 From: wbriscoe at ponle.demon.co.uk (Walter Briscoe) Date: Wed Mar 22 17:10:05 2006 Subject: [splint-discuss] File and path names under Windows In-Reply-To: <034a01c2fa4e$32253ed0$27cfed89@sc021077> References: <01a501c2fa1f$2862d0d0$27cfed89@sc021077> <3E8CC542.57399739@yahoo.com> <034a01c2fa4e$32253ed0$27cfed89@sc021077> Message-ID: In message <034a01c2fa4e$32253ed0$27cfed89@sc021077> of Thu, 3 Apr 2003 18:02:06 in , Sid Price writes >Thanks for the heads-up on HTML, I am using a news reader at a clients >office and it was set up that way, sorry. I see your prefixed response is the result of using Outlook Express. The success of such "free" software suggests there is a need for a new version of the (ISTR it is Gresham's) law: "Bad money drives out good!". > >The news about spaces in paths is disappointing, these projects are large >and have many folder names that are both long and/or with spaces. Which >means that Splint is not going to be adopted. Splint's big advantage is that source is published. I suggest you use a debuggger to analyse the behaviour and quantify the difficulty of constructing a fix. I came to Splint after many years of using PC-Lint and FlexeLint (commercial products from http://www.gimpel.com). Originally, I bought myself and convinced clients to try. They have (or did have) a 30 day satisfaction offer. I now get the work free as a permanent Beta tester. With those qualifications, I recommend the product. About a year ago, I put a lot of work into using splint and concluded that it was too hard to control to bolt onto old work. It MAY be OK for new work. I find the concepts in it are really good. You might also look at QAC (no URL to hand; I don't use it myself.) It costs a lot of money but seems very good. The products from www.parasoft.com offer 7 day trials, are fairly expensive and good. PC-Lint/FlexeLint is a coder's tool; the other commercial products seem more oriented towards a management control perspective. I am really irritated that I am too stupid to make effective use of splint; the price is right; the cost is not! [snip] -- Walter Briscoe From roland.illig at gmx.de Sun Apr 6 13:43:24 2003 From: roland.illig at gmx.de (roland.illig@gmx.de) Date: Wed Mar 22 17:10:05 2006 Subject: [splint-discuss] 'make check' fails Message-ID: <20030406174324.GA5388@burse.uni-hamburg.de> Hi, I'm new to SPlint, and I'm wondering about the results of 'make check'. There are 110 lines containing '*** FAIL ***' and many discrepancies between what is expected and what is the actual result. Can someone explain this to me? Roland From beebe at math.utah.edu Mon Apr 7 07:31:06 2003 From: beebe at math.utah.edu (Nelson H. F. Beebe) Date: Wed Mar 22 17:10:05 2006 Subject: [splint-discuss] 'make check' fails Message-ID: Roland reports on Sun, 6 Apr 2003 19:43:24 +0200: >> I'm wondering about the results of 'make check'. >> There are 110 lines containing '*** FAIL ***' .... Something is very wrong in your build. I checked the build logs here for splint-3.0.1.6 on 11 different Unix platforms, and none had a single test failure. What system are you building splint on, and what compiler did you use? ------------------------------------------------------------------------------- - Nelson H. F. Beebe Tel: +1 801 581 5254 - - Center for Scientific Computing FAX: +1 801 581 4148 - - University of Utah Internet e-mail: beebe@math.utah.edu - - Department of Mathematics, 110 LCB beebe@acm.org beebe@computer.org - - 155 S 1400 E RM 233 beebe@ieee.org - - Salt Lake City, UT 84112-0090, USA URL: http://www.math.utah.edu/~beebe - ------------------------------------------------------------------------------- From roland.illig at gmx.de Mon Apr 7 12:38:22 2003 From: roland.illig at gmx.de (roland.illig@gmx.de) Date: Wed Mar 22 17:10:05 2006 Subject: [splint-discuss] 'make check' fails In-Reply-To: References: Message-ID: <20030407163822.GA13071@burse.uni-hamburg.de> On Mon, Apr 07, 2003 at 05:31:06AM -0600, Nelson H. F. Beebe wrote: > Roland reports on Sun, 6 Apr 2003 19:43:24 +0200: > > >> I'm wondering about the results of 'make check'. > >> There are 110 lines containing '*** FAIL ***' .... > > Something is very wrong in your build. I checked the build logs > here for splint-3.0.1.6 on 11 different Unix platforms, and > none had a single test failure. > > What system are you building splint on, and what compiler did you use? The system raising the 110 *** FAIL *** lines is: Operating-System: NetBSD 1.6 Compiler: gcc-2.95.3 Processor: a buggy i586 Cyrix that halts the system about every two weeks Another system, a GNU/Linux-2.4.20 using gcc-3.2.3 resulted in the following: ... Compiling mapping.c... Splint 3.0.1.6 --- 07 Apr 2003 *** Segmentation Violation *** Location (not trusted): standard.h:1005:140 *** Last code point: llmain.c:1165 *** Previous code point: llmain.c:902 *** Please report bug to splint-bug@splint.org Splint 3.0.1.6 --- 07 Apr 2003 *** Segmentation Violation *** Location (not trusted): standard.h:1005:140 *** Last code point: llmain.c:1165 *** Previous code point: llmain.c:902 *** Please report bug to splint-bug@splint.org Splint 3.0.1.6 --- 07 Apr 2003 clabstract.c:1273: at source point standard.h:1005:140: *** Internal Bug at clabstract.c:1273: llassert failed: uentry_isValid (ue) [errno: 25] *** Last code point: llmain.c:1165 *** Previous code point: llmain.c:902 Possible system error diagnostic: : Inappropriate ioctl for device *** Please report bug to splint-bug@splint.org *** (attempting to continue, results may be incorrect) clabstract.c:1274: at source point standard.h:1005:140: *** Internal Bug at clabstract.c:1274: llassert failed: uentry_isDatatype (ue) [errno: 25] *** Last code point: llmain.c:1165 *** Previous code point: llmain.c:902 Possible system error diagnostic: : Inappropriate ioctl for device *** Please report bug to splint-bug@splint.org *** (attempting to continue, results may be incorrect) *** Segmentation Violation *** Location (not trusted): standard.h:1005:140 *** Last code point: llmain.c:1165 *** Previous code point: llmain.c:902 *** Please report bug to splint-bug@splint.org Splint 3.0.1.6 --- 07 Apr 2003 fileTable.c:381: at source point standard.h:1022:41: *** Internal Bug at fileTable.c:381: llassert failed: fileTable_isDefined (ft) && fileTable_inRange (ft, fid) [errno: 25] *** Last code point: llmain.c:1165 *** Previous code point: llmain.c:902 Possible system error diagnostic: : Inappropriate ioctl for device *** Please report bug to splint-bug@splint.org *** (attempting to continue, results may be incorrect) *** Segmentation Violation *** Location (not trusted): standard.h:1022:41 *** Last code point: llmain.c:1165 *** Previous code point: llmain.c:902 *** Please report bug to splint-bug@splint.org Splint 3.0.1.6 --- 07 Apr 2003 *** Segmentation Violation *** Location (not trusted): standard.h:1005:140 *** Last code point: llmain.c:1165 *** Previous code point: llmain.c:902 *** Please report bug to splint-bug@splint.org Splint 3.0.1.6 --- 07 Apr 2003 fileTable.c:381: at source point standard.h:1022:41: *** Internal Bug at fileTable.c:381: llassert failed: fileTable_isDefined (ft) && fileTable_inRange (ft, fid) [errno: 25] *** Last code point: llmain.c:1165 *** Previous code point: llmain.c:902 Possible system error diagnostic: : Inappropriate ioctl for device *** Please report bug to splint-bug@splint.org *** (attempting to continue, results may be incorrect) *** Segmentation Violation *** Location (not trusted): standard.h:1022:41 *** Last code point: llmain.c:1165 *** Previous code point: llmain.c:902 *** Please report bug to splint-bug@splint.org Splint 3.0.1.6 --- 07 Apr 2003 *** Segmentation Violation *** Location (not trusted): standard.h:1005:140 *** Last code point: llmain.c:1165 *** Previous code point: llmain.c:902 *** Please report bug to splint-bug@splint.org Making all in imports ... Roland From roland.illig at gmx.de Mon Apr 7 19:44:56 2003 From: roland.illig at gmx.de (roland.illig@gmx.de) Date: Wed Mar 22 17:10:05 2006 Subject: [splint-discuss] 'make check' fails In-Reply-To: References: Message-ID: <20030407234456.GA27023@burse.uni-hamburg.de> Hmmm, I have an idea that could be a bug. I have splint-3.0.1.6 already installed in /usr/local/pkg/splint-3.0.1.6 When I compile a new version and 'make checks', the library files 'standard.lcd' are loaded from /usr/local/pkg/splint-3.0.1.6, and not from the build directory. This could lead to undefined behaviour. Roland From roland.illig at gmx.de Mon Apr 7 21:15:52 2003 From: roland.illig at gmx.de (roland.illig@gmx.de) Date: Wed Mar 22 17:10:05 2006 Subject: [splint-discuss] 'make check' test results Message-ID: <20030408011551.GA27582@burse.uni-hamburg.de> Operating System: NetBSD 1.6 Inside: VMware 3.2 Workstation Operating System: GNU/Linux-2.4.20 Debian Machine: Duron 800 all as expected, but ... ... Checking utypes... 6,17c6,11 < utypes.c:3:23: Variable uchar inconsistently redeclared as datatype < utypes.c:13: Previous definition of uchar as variable: ? < utypes.c:4:24: Variable ushort inconsistently redeclared as datatype < utypes.c:15: Previous definition of ushort as variable: ? < utypes.c:5:22: Variable uint inconsistently redeclared as datatype < utypes.c:14: Previous definition of uint as variable: ? < utypes.c:6:23: Variable ulong inconsistently redeclared as datatype < utypes.c:16: Previous definition of ulong as variable: ? < utypes.c: (in function f) < utypes.c:26:8: Variable src_bytes declared but not used < < Finished checking --- 6 code warnings, as expected --- > usr/include/sys/cdefs.h:212:40: #error "No function renaming possible" > In file included from usr/include/machine/types.h:41, > from usr/include/sys/types.h:47, > from utypes.c:17 > Preprocessing error for file: /tmp/splint-build/splint-3.0.1.6/test/utypes.c > *** Cannot continue. *** FAIL *** Checking void... ... Roland PS: How can I subscribe to the splint-bug@splint.org mailing list? From lasse.kantola at nokia.com Wed Apr 9 13:00:54 2003 From: lasse.kantola at nokia.com (lasse.kantola@nokia.com) Date: Wed Mar 22 17:10:05 2006 Subject: [splint-discuss] Beginner problems with reference counting Message-ID: <7AB8A321754AC94E9D6753AB81439C2F151654@esebe021.ntc.nokia.com> Hi, I have started using Splint with some of my projects. Splint has proved to be very powerful code analyzer but quite hard for me to learn to use efficiently. Currently I am battling with reference counting. There are at least four warnings that I do not know how to get rid of. I would very much appreciate an example code how to do things correctly. Below are the output of splint and under that the code that is checked. --------------------------------------------------- splint -strict -namechecks refcount.c Splint 3.0.1.6 --- 17 Dec 2002 refcount.c: (in function count_add) refcount.c:18:8: Reference counted storage returned without modifying reference count: (data) Reference counted storage is transferred in a way that may not be consistent with the reference count. (Use -refcounttrans to inhibit warning) refcount.c: (in function count_dec) refcount.c:25:16: Reference counted storage passed as only param: destroy_data (data) refcount.c:26:2: Variable data is released in true branch, but live in continuation. The state of a variable is different depending on which branch is taken. This means no annotation can sensibly be applied to the storage. (Use -branchstate to inhibit warning) refcount.c:25:16: Storage data is released refcount.c: (in function main) refcount.c:53:24: New reference e1 not released before return A memory leak has been detected. Only-qualified storage is not released before the last reference to it is lost. (Use -mustfreeonly to inhibit warning) refcount.c:51:2: Storage e1 becomes newref Finished checking --- 4 code warnings --------------------------------------------------- 1 #include 2 3 typedef struct Data_s Data; 4 typedef /*@refcounted@*/ Data *Data_rp; 5 struct Data_s { 6 /*@refs@*/ int refs; 7 /*@null@*/ Data_rp other; 8 }; 9 10 static Data_rp count_add(Data_rp data) /*@modifies data->refs@*/; 11 static void count_dec(/*@killref@*/ Data_rp data) /*@modifies data@*/; 12 static void destroy_data(/*@only@*/ Data_rp data) /*@modifies data@*/; 13 static /*@null@*/ Data_rp new_data(void) /*@modifies nothing@*/; 14 15 static Data_rp count_add(Data_rp data) 16 { 17 data->refs++; 18 return(data); 19 } 20 21 static void count_dec(Data_rp data) 22 { 23 data->refs--; 24 if(data->refs == 0) { 25 destroy_data(data); 26 } 27 } 28 29 static void destroy_data(Data_rp data) 30 { 31 if(data->other != NULL) { 32 count_dec(data->other); 33 } 34 free(data); 35 } 36 37 static Data_rp new_data(void) { 38 Data_rp data; 39 data = calloc((size_t) 1, sizeof(*data)); 40 if(data == NULL) { 41 return(NULL); 42 } 43 44 data->refs = 1; 45 return(data); 46 } 47 48 int main(/*@unused@*/ int argc, /*@unused@*/ char **argv) { 49 Data_rp e1, e2; 50 51 e1 = new_data(); 52 if(e1 == NULL) { 53 return(EXIT_FAILURE); 54 } 55 e2 = count_add(e1); 56 57 count_dec(e1); 58 count_dec(e2); 59 60 return(EXIT_SUCCESS); 61 } --------------------------------------------------- -- Lasse Kantola From tempest at triconet.co.za Thu Apr 10 15:27:30 2003 From: tempest at triconet.co.za (M Tempest) Date: Wed Mar 22 17:10:05 2006 Subject: [splint-discuss] Documentation for 3.0.1.6, comparing tools References: <001901c2fa13$0993d0c0$99b4ef9b@user4fjyoqudzq> Message-ID: <000001c2fff3$0c744f00$c6b5ef9b@user4fjyoqudzq> > On Thu, 3 Apr 2003, M Tempest wrote: [snip] > > The documentation for 3.0.1.6 states that it is an Alpha version, and that > > the documentation is therefore lagging behind. This is fine, but I would > > like to know where I can find out about these intentional (but undocumented) > > features. On Thu, 3 Apr 2003, David Evans wrote: > Which documentation are you referring to? > > The Splint Manual at http://www.splint.org/manual/ is up-to-date (at > least its meant to be!) with what is implemented in 3.0.1.6. There are a > few undocumented flags (but they are intended just for our own testing and > debugging.) You can access the current development code through > sourceforge CVS, but that is not necessarily stable and may not have up to > date documentation. > Sorry for taking a while to get back to you, but I hunted down that reference. The readme file in the win32 distribution says: "WARNING: this is an Alpha release - new features and changes are not reflected in the documentation. " That's what prompted the question. Would I be correct in assuming that all versions of your manual are derived from a common source, and that the PDF (which I downloaded) is as up-to-date as any other version? BTW, I've observed some discussion comparing different static analysis tools on this mailing list of late. I'd like to add my 2c. Rather than say that one tools is *better* than any other, I would like to note that my company employs *several* static analysis tools. Specifically, we use QA/C (by Programming Research) with some custom extensions, Cantata (by IPL) and C compilers from several vendors including Borland, Wind River, Motorola and GCC. Each of these tools has its strong points and its idiosyncracies. We're adding Splint to that list, because it can perform certain *types* of analysis better than any of our other tools. (Specifically, I'm using Splint to detect use-before-definition and null-pointer-dereferencing. Other checks are incidental, at present) Sure, using many different tools can be a pain, but it beats doing all those checks by hand :-) Michael From abhins_4 at yahoo.com Tue Apr 15 01:19:37 2003 From: abhins_4 at yahoo.com (abhishek jain) Date: Wed Mar 22 17:10:05 2006 Subject: [splint-discuss] problem in including headers Message-ID: <20030415051937.57713.qmail@web40302.mail.yahoo.com> hi there, i want to use splint to check my project code which is spanned across different folders(*.h,*.c). i am working on windows 2000 platform but unable to do include setting for splint to run. the problem is, if i am running some *.c file which is in folder say c:\project\f1\*.c and the corresponding header is in some other folder in the same parent directory say c:\project\f2\*.h, then how to tell splint to pick headers from those folders.. i want some kind of setting in which if i just specify the parent folder, (project) in this case , splint should recursively check the various directories and can read the headers.. please send me the solution at the earliest.. bye __________________________________________________ Do you Yahoo!? The New Yahoo! Search - Faster. Easier. Bingo http://search.yahoo.com From stephane.martin at ca.kontron.com Tue Apr 15 08:44:29 2003 From: stephane.martin at ca.kontron.com (=?iso-8859-1?Q?=22Martin=2C_St=E9phane=22?=) Date: Wed Mar 22 17:10:05 2006 Subject: [splint-discuss] problem in including headers Message-ID: <5009AD9521A8D41198EE00805F85F18F03B67C8A@sembo111.teknor.com> You can use an dot rc file and include the -I swich such as you would have used it with a compiler > hi there, > i want to use splint to check my project code which is > spanned across different folders(*.h,*.c). i am > working on windows 2000 platform but unable to do > include setting for splint to run. > the problem is, if i am running some *.c file which is > in folder say c:\project\f1\*.c and the corresponding > header is in some other folder in the same parent > directory say c:\project\f2\*.h, then how to tell > splint to pick headers from those folders.. > i want some kind of setting in which if i just specify > the parent folder, (project) in this case , splint > should recursively check the various directories and > can read the headers.. > please send me the solution at the earliest.. > bye > > > __________________________________________________ > Do you Yahoo!? > The New Yahoo! Search - Faster. Easier. Bingo > http://search.yahoo.com > _______________________________________________ > splint-discuss mailing list > splint-discuss@cs.virginia.edu > http://www.splint.org/mailman/listinfo/splint-discuss From roland.illig at gmx.de Wed Apr 16 14:54:18 2003 From: roland.illig at gmx.de (roland.illig@gmx.de) Date: Wed Mar 22 17:10:05 2006 Subject: [splint-discuss] [FEATURE] abstract type Message-ID: <20030416185418.GA18516@burse.uni-hamburg.de> == Feature-Request == I'd like to have an abstract type that is known to be a reference type. That means: - Variables of this type can be compared to NULL and to other variables of the same type. - The /*@null@*/ and /*@notnull@*/ annotations are applicable to variables of this type. == Example == typedef /*@abstract@*/ /*@mutable@*/ /*@reference@*/ struct { ... } *String; bool String_isEmpty(/*@notnull@*/ /*@temp@*/ String) /*@*/; == End == Roland From jcromie at divsol.com Thu Apr 17 13:53:15 2003 From: jcromie at divsol.com (Jim Cromie) Date: Wed Mar 22 17:10:05 2006 Subject: [splint-discuss] newbie questions. Message-ID: <3E9EEA0B.4050605@divsol.com> Hi all, Ive just submitted a patch to perl5 makefile to add a splint target, its mostly borrowed from perl6; Im not pretending to know what Im doing. Im seeking advice on the 1st problem detected, it appears to be an issue of not picking up various #defines. < more preprocessing ... > < more preprocessing .. > util.c:93:31: macro `PerlMem_realloc' used without args < more preprocessing . > Preprocessing error for file: /home/jimc/bleadperl/util.c *** Cannot continue. < cleaning .......... > make: *** [splint] Error 1 and the offending code. 87 Malloc_t 88 Perl_safesysrealloc(Malloc_t where,MEM_SIZE size) 89 { 90 dTHX; 91 Malloc_t ptr; 92 #if !defined(STANDARD_C) && !defined(HAS_REALLOC_PROTOTYPE) && !defined(PERL_MICRO) 93 Malloc_t PerlMem_realloc(); 94 #endif /* !defined(STANDARD_C) && !defined(HAS_REALLOC_PROTOTYPE) */ 95 there are a number of #defines on 92 which protect the code, it seems apriori that theyre not observed by splint, which then gives up. splintflags = -weak +showscan +showsummary +posixstrictlib -abstract +aliasunique +ansireserved +ansireservedinternal +assignexpose +bitwisesigned +boolcompare +booltype BOOLVAL +casebreak -castfcnptr -charint +continuecomment +controlnestdepth 15 +cppnames +declundef +distinctinternalnames +evalorder +fielduse +forcehints -globs +imptype +includenest 8 +incondefs +incondefslib +linelen 9999 +longintegral +macroassign +macroempty +macroredef +matchanyintegral +nestedextern +noeffect +readonlystrings +realcompare +shadow -type # example usage: make splintopts='-posixstrictlib +posixlib +gnuextensions' splint splintopts = .PHONY: splint splint: $(c) @test `which $(SPLINT)` || echo please install splint, http://splint.org && exit 1 $(SPLINT) $(splintflags) $(splintopts) $(c) > perl.fuzz From evans at cs.virginia.edu Fri Apr 18 10:05:46 2003 From: evans at cs.virginia.edu (David Evans) Date: Wed Mar 22 17:10:05 2006 Subject: [splint-discuss] newbie questions. In-Reply-To: <3E9EEA0B.4050605@divsol.com> References: <3E9EEA0B.4050605@divsol.com> Message-ID: Is there a #define PermMem_realloc somewhere? The preprocessing error seems to indicate there is, but the code is declaring PerlMem_realloc inside the define's. As a workaround, you can use #ifndef S_SPLINT_S ... #endif around the problem code to avoid splint processing it. --- Dave On Thu, 17 Apr 2003, Jim Cromie wrote: > Hi all, > > Ive just submitted a patch to perl5 makefile to add a splint target, > its mostly borrowed from perl6; Im not pretending to know what Im doing. > > Im seeking advice on the 1st problem detected, > it appears to be an issue of not picking up various #defines. > > > < more preprocessing ... > > < more preprocessing .. > > util.c:93:31: macro `PerlMem_realloc' used without args > < more preprocessing . > > Preprocessing error for file: /home/jimc/bleadperl/util.c > *** Cannot continue. > < cleaning .......... > > make: *** [splint] Error 1 > > > and the offending code. > > 87 Malloc_t > 88 Perl_safesysrealloc(Malloc_t where,MEM_SIZE size) > 89 { > 90 dTHX; > 91 Malloc_t ptr; > 92 #if !defined(STANDARD_C) && !defined(HAS_REALLOC_PROTOTYPE) && > !defined(PERL_MICRO) > 93 Malloc_t PerlMem_realloc(); > 94 #endif /* !defined(STANDARD_C) && !defined(HAS_REALLOC_PROTOTYPE) */ > 95 > > > there are a number of #defines on 92 which protect the code, it seems > apriori that theyre not observed by splint, which then gives up. > > > > > splintflags = -weak +showscan +showsummary +posixstrictlib -abstract > +aliasunique +ansireserved +ansireservedinternal +assignexpose > +bitwisesigned +boolcompare +booltype BOOLVAL +casebreak -castfcnptr > -charint +continuecomment +controlnestdepth 15 +cppnames +declundef > +distinctinternalnames +evalorder +fielduse +forcehints -globs +imptype > +includenest 8 +incondefs +incondefslib +linelen 9999 +longintegral > +macroassign +macroempty +macroredef +matchanyintegral +nestedextern > +noeffect +readonlystrings +realcompare +shadow -type > > # example usage: make splintopts='-posixstrictlib +posixlib > +gnuextensions' splint > splintopts = > > .PHONY: splint > splint: $(c) > @test `which $(SPLINT)` || echo please install splint, > http://splint.org && exit 1 > $(SPLINT) $(splintflags) $(splintopts) $(c) > perl.fuzz > > > _______________________________________________ > splint-discuss mailing list > splint-discuss@cs.virginia.edu > http://www.splint.org/mailman/listinfo/splint-discuss > From F.Giavarini at cobra.it Fri Apr 18 08:27:12 2003 From: F.Giavarini at cobra.it (F.Giavarini@cobra.it) Date: Wed Mar 22 17:10:05 2006 Subject: [splint-discuss] Code for embedded processor Message-ID: Hello, I have recently started using Splint and I have encountered one problem when Splint try to checks the fallowing code: //--------------------------------------------------------- typedef union { unsigned char BYTE; struct { unsigned char PA0:1; unsigned char PA1:1; unsigned char PA2:1; unsigned char PA3:1; unsigned char PA4:1; unsigned char PA5:1; unsigned char PA6:1; unsigned char PA7:1; }BIT; }PADR_H; @tiny volatile PADR_H _PADR @0x00; /* Port A Data Register */ @tiny volatile PADR_H _PADDR @0x01; /* Port A Data Direction */ @tiny volatile PADR_H _PAOR @0x02; /* Port A Option register */ //--------------------------------------------------------- The compiler that I'm using recognize the modifier @tiny and @0x00 in order to assign one specific memory location. I don't know how to tell Splint to ignore this kind of indications. This is the error that it stops the Splint execution. C:\?.REG_72334.h(25,15): Parse Error: Inconsistent function declaration: tiny : int. (For help on parse errors, see splint -help parseerrors.) *** Cannot continue. Could someone please explain how to solve this problem. Thanks! Flavio -------------------------------------------------------------- Flavio Giavarini Software Designer - Development Department Delta Elettronica S.p.a. Via Astico, 41 21100 Varese Italy Tel +39 0332 82.51.11 Fax +39 0332 22.20.05 From jcromie at divsol.com Fri Apr 18 11:38:30 2003 From: jcromie at divsol.com (Jim Cromie) Date: Wed Mar 22 17:10:05 2006 Subject: [splint-discuss] Re: splinting perl5 In-Reply-To: References: <3E9EEA0B.4050605@divsol.com> Message-ID: <3EA01BF6.4090602@divsol.com> David Evans wrote: >Is there a #define PermMem_realloc somewhere? > indeed there is. straight name-map, no fancy macro stuff. > >The preprocessing error seems to indicate there is, but the code is >declaring PerlMem_realloc inside the define's. > >As a workaround, you can use >#ifndef S_SPLINT_S >... >#endif > > that works past 1st prob, thx. So, on to next ones.. =:-) $> make splintopts='-posixstrictlib +posixlib +gnuextensions -showscan -nestedextern' splint (options and args elided, options are in previous post, args are $(c) ) usr/include/arpa/inet.h:35:27: Parse Error: Inconsistent function declaration: in_addr_t : extern ?. (For help on parse errors, see splint -help parseerrors.) *** Cannot continue. so this prompts a general Q, maybe FAQ-able. Why does the error report on a system-header ? would it not be better to report on the code/header that conflicts with it ? or better yet both, ie A:line:chrpos conflicts with B:line:chrpos. also - i presume the leading / on usr/include... is implicit. or is this an indication that I need to remake the import/* or LARCH_PATH files to examine my system headers (RH linux 2.4.18-27.7.x) Q. should application header files be added to cmd-line ? ex: make splintopts='-posixstrictlib +posixlib +gnuextensions -showscan -nestedextern \$(h)' splint this now reports different error - av.h:13:12: Parse Error. 11 struct xpvav { 12 char* xav_array; /* pointer to first array element */ 13 SSize_t xav_fill; /* Index of last element present */ so this implies to me that *.h shouldnt be on cmd-line - SSize_t is #defined to ssize_t, as computed by Configure, and written into config.h thx again. jimc From roland.illig at gmx.de Sun Apr 20 12:18:54 2003 From: roland.illig at gmx.de (roland.illig@gmx.de) Date: Wed Mar 22 17:10:05 2006 Subject: [splint-discuss] Code for embedded processor In-Reply-To: References: Message-ID: <20030420161854.GB16525@burse.uni-hamburg.de> On Fri, Apr 18, 2003 at 02:27:12PM +0200, F.Giavarini@cobra.it wrote: > > @tiny volatile PADR_H _PADR @0x00; /* Port A Data Register */ > @tiny volatile PADR_H _PADDR @0x01; /* Port A Data Direction */ > @tiny volatile PADR_H _PAOR @0x02; /* Port A Option register > */ > #ifdef S_SPLINT_S #define tiny #else #define tiny @tiny #endif /* Roland */ From list_ob at gmx.net Wed Apr 23 06:06:19 2003 From: list_ob at gmx.net (Oliver Betz) Date: Wed Mar 22 17:10:05 2006 Subject: [splint-discuss] Code for embedded processor In-Reply-To: Message-ID: <3EA681BB.22358.24E243@localhost> F.Giavarini@cobra.it wrote: > typedef union > { > unsigned char BYTE; > struct > { > unsigned char PA0:1; [...] AFAIK, char is not allowed in bitfields (another "embedded" peculiarity). > @tiny volatile PADR_H _PADR @0x00; /* Port A Data Register */ [...] > The compiler that I'm using recognize the modifier @tiny and @0x00 in order > to assign one specific memory location. > I don't know how to tell Splint to ignore this kind of indications. BTW: You might have a look at the archives of this list. Four weeks ago there was the last thread about this topic, and there were many other threads. You have to hide both from Splint. Roland showed how to do it for @tiny. For the second, use something like #define PORT(x) @(x). You might encounter problems also for constant assignments to char variables, e.g. unsigned char foo; foo = 1; results in "Assignment of int to unsigned char". No satisfactory solution available for this. Harder to hide are assembler blocks (#pragma asm/#pragma endasm), the Splint parser can't handle it. Maybe you look at PC-Lint, commercial (220EUR) capable of handling non-ANSI-stuff of nearly all compilers, and also checking for MISRA rules, indentation and much more... I finally bought it for my commercial work but still had no time to make extensive tests. Oliver -- Oliver Betz, Muenchen From roland.illig at gmx.de Wed Apr 23 08:05:27 2003 From: roland.illig at gmx.de (roland.illig@gmx.de) Date: Wed Mar 22 17:10:05 2006 Subject: [splint-discuss] Reference-Counting Message-ID: <20030423120527.GA8390@burse.uni-hamburg.de> I have the following function: extern void DelphiString_free(/*@killref@*/ DelphiString s) /*@modifies s->references; @*/ { s->references = s->references - 1; if (s->references == 0) { free(s->data); free(s); /*(1)*/ } } SPlint tells me that I passed a /*@refcounted@*/ param as /*@only@*/ at /*(1)*/. Do I have to suppress this warning or is there a better annotation? Are there any small examples for SPlint? Some archive of small programs doing reference counting, pointer access, linked lists, and so on? I only found the ones in the ./test/ directory, but they contain intended bugs. Roland From Simon.Hosie at connexionz.co.nz Wed Apr 23 18:21:30 2003 From: Simon.Hosie at connexionz.co.nz (Simon Hosie) Date: Wed Mar 22 17:10:06 2006 Subject: [splint-discuss] Code for embedded processor Message-ID: F.Giavarini@cobra.it: > I hoped in one more general solution because for every register of > micro-processor I have one structure like that; and in total they are > hundred. I would have preferred to avoid source modifications. You could move them all into a header, and then replace the whole file when splint runs. From stephane.martin at ca.kontron.com Thu Apr 24 09:13:27 2003 From: stephane.martin at ca.kontron.com (=?iso-8859-1?Q?=22Martin=2C_St=E9phane=22?=) Date: Wed Mar 22 17:10:06 2006 Subject: [splint-discuss] Code for embedded processor Message-ID: <5009AD9521A8D41198EE00805F85F18F03BE9659@sembo111.teknor.com> We did something near to the suggestion below. We have written a splintfool.h with all declaration we want splint see and we have surround the inclusion like this: #ifdef S_SPLINT_S /* fool splint for system declaration */ #include "splintfool.h" #endif Since Splint perform all check assuming S_SPLINT_S is define and since it is not really define for your compiler, all tools are "happy"!. We have apply this way for compiling code under linux OS where Splint try to sperad the checks across all OS files and where we can't modify those files. On an other project wich is firmware on a microcontroller Hitachi we use this kind of bit field declaration: struct st_p9 { /* struct P9 */ unsigned char DDR; /* P9DDR */ union { /* P9DR */ unsigned char BYTE; /* Byte Access */ struct { /* Bit Access */ unsigned char B7:1; /* Bit 7 */ unsigned char B6:1; /* Bit 6 */ unsigned char B5:1; /* Bit 5 */ unsigned char B4:1; /* Bit 4 */ unsigned char B3:1; /* Bit 3 */ unsigned char B2:1; /* Bit 2 */ unsigned char B1:1; /* Bit 1 */ unsigned char B0:1; /* Bit 0 */ } BIT; /* */ } DR; /* */ And there is no problem for Splint to Check such structure, you could probably "fool" this way doing something like: #ifdef S_SPLINT_S /* fool splint for system declaration */ #include "splintfool.h" #else /* micro i/o port declaration */ #inclide iodefine.h #endif > -----Original Message----- > From: Simon Hosie [SMTP:Simon.Hosie@connexionz.co.nz] > Sent: 23 avril, 2003 18:22 > To: splint-discuss@cs.virginia.edu > Subject: RE: [splint-discuss] Code for embedded processor > > F.Giavarini@cobra.it: > > I hoped in one more general solution because for every register of > > micro-processor I have one structure like that; and in total they are > > hundred. I would have preferred to avoid source modifications. > > You could move them all into a header, and then replace the whole file > when splint runs. > > _______________________________________________ > splint-discuss mailing list > splint-discuss@cs.virginia.edu > http://www.splint.org/mailman/listinfo/splint-discuss From Florent.Parent at hexago.com Thu Apr 24 15:56:25 2003 From: Florent.Parent at hexago.com (Florent Parent) Date: Wed Mar 22 17:10:06 2006 Subject: [splint-discuss] problem using splint-3.0.1.6 on NetBSD Message-ID: <1904780000.1051214185@blues.viagenie.qc.ca> Hello, Anyone successfully used splint (/usr/pkgsrc/devel/splint) on NetBSD? I get errors on sys/cdefs.h with just about any source code: $ splint /usr/src/bin/pwd/pwd.c Splint 3.0.1.6 --- 20 Apr 2003 In file included from pwd.c:36 include/sys/cdefs.h:232:40: #error "No function renaming possible" Preprocessing error for file: /usr/src/bin/pwd/pwd.c *** Cannot continue. Offending code in cdefs.h is #if !defined(_STANDALONE) && !defined(_KERNEL) #ifdef __GNUC__ #define __RENAME(x) ___RENAME(x) #else #ifdef __lint__ #define __RENAME(x) __symbolrename(x) #else #error "No function renaming possible" #endif /* __lint__ */ #endif /* __GNUC__ */ #else /* _STANDALONE || _KERNEL */ #define __RENAME(x) no renaming in kernel or standalone environment #endif I've tried -D__lint__ (like lint(1) does) but that simply fails elsewhere: $ splint -D__lint__ /usr/src/bin/pwd/pwd.c Splint 3.0.1.6 --- 20 Apr 2003 include/sys/bswap.h:21:42: Parse Error: New function scope inside function. (For help on parse errors, see splint -help parseerrors.) *** Cannot continue. I haven't found any information in the mailing list archive in reference to this problem (http://www.mail-archive.com/lclint-interest%40virginia.edu/) (BTW, most recent message date back to 12/02/2002. Is the archive broken?) any help appreciated. Florent From roland.illig at gmx.de Thu Apr 24 16:43:09 2003 From: roland.illig at gmx.de (roland.illig@gmx.de) Date: Wed Mar 22 17:10:06 2006 Subject: [splint-discuss] problem using splint-3.0.1.6 on NetBSD In-Reply-To: <1904780000.1051214185@blues.viagenie.qc.ca> References: <1904780000.1051214185@blues.viagenie.qc.ca> Message-ID: <20030424204309.GA17016@burse.uni-hamburg.de> On Thu, Apr 24, 2003 at 03:56:25PM -0400, Florent Parent wrote: > > Hello, > > Anyone successfully used splint (/usr/pkgsrc/devel/splint) on NetBSD? I get > errors on sys/cdefs.h with just about any source code: > As a workaround, I used #ifndef S_SPLINT_S #include #endif There are some bugs in the splint libraries. For example, write(2) is not declared to /*@modifies fileSystem; @*/. Where should I send patches to these files? Is splint-bugs a public mailing list? Roland From reichert at numachi.com Thu Apr 24 17:42:15 2003 From: reichert at numachi.com (Brian Reichert) Date: Wed Mar 22 17:10:07 2006 Subject: [splint-discuss] problem using splint-3.0.1.6 on NetBSD In-Reply-To: <20030424204309.GA17016@burse.uni-hamburg.de> References: <1904780000.1051214185@blues.viagenie.qc.ca> <20030424204309.GA17016@burse.uni-hamburg.de> Message-ID: <20030424214215.GF53668@numachi.com> On Thu, Apr 24, 2003 at 10:43:09PM +0200, roland.illig@gmx.de wrote: > There are some bugs in the splint libraries. For example, write(2) is not > declared to /*@modifies fileSystem; @*/. Where should I send patches to > these files? But write(2) doesn't modify filesytems, neccessarily. If writes output to a file descriptor. Your open() semantics (O_CREAT, etc.) (or socket(), or whatever) would be where the check for filesystem modifications. Or have I misunderstood your intent? > Roland -- Brian 'you Bastard' Reichert 37 Crystal Ave. #303 Daytime number: (603) 434-6842 Derry NH 03038-1713 USA BSD admin/developer at large From Florent.Parent at hexago.com Thu Apr 24 21:44:18 2003 From: Florent.Parent at hexago.com (Florent Parent) Date: Wed Mar 22 17:10:07 2006 Subject: [splint-discuss] problem using splint-3.0.1.6 on NetBSD In-Reply-To: <20030424204309.GA17016@burse.uni-hamburg.de> References: <1904780000.1051214185@blues.viagenie.qc.ca> <20030424204309.GA17016@burse.uni-hamburg.de> Message-ID: <1957220000.1051235058@blues.viagenie.qc.ca> --On Thursday, April 24, 2003 22:43:09 +0200 roland.illig@gmx.de wrote: >> Anyone successfully used splint (/usr/pkgsrc/devel/splint) on NetBSD? I >> get errors on sys/cdefs.h with just about any source code: >> > > As a workaround, I used > ># ifndef S_SPLINT_S ># include ># endif But if the source contains includes such as #include #include #include #include #include sys/cdefs.h is referenced in types.h, ioctl.h, socket.h. The workaround would be non-trivial to apply. I'm able to use lint(1) successfully, and noted that lint passes the following arguments to the prepresessor: /usr/bin/cc -E -x c -U__GNUC__ -Wp,-CC -Wcomment -D__LINT__ -Dlint -D__lint -D__lint__ ... But no luck using those with splint. I've only got a few hours experience using splint, so I was hoping something obvious was escaping me. thanks for the response. Florent From roland.illig at gmx.de Fri Apr 25 09:41:00 2003 From: roland.illig at gmx.de (roland.illig@gmx.de) Date: Wed Mar 22 17:10:07 2006 Subject: [splint-discuss] problem using splint-3.0.1.6 on NetBSD In-Reply-To: <20030424214215.GF53668@numachi.com> References: <1904780000.1051214185@blues.viagenie.qc.ca> <20030424204309.GA17016@burse.uni-hamburg.de> <20030424214215.GF53668@numachi.com> Message-ID: <20030425134059.GB22513@burse.uni-hamburg.de> On Thu, Apr 24, 2003 at 05:42:15PM -0400, Brian Reichert wrote: > On Thu, Apr 24, 2003 at 10:43:09PM +0200, roland.illig@gmx.de wrote: > > There are some bugs in the splint libraries. For example, write(2) is not > > declared to /*@modifies fileSystem; @*/. Where should I send patches to > > these files? > > But write(2) doesn't modify filesytems, neccessarily. If writes > output to a file descriptor. Your open() semantics (O_CREAT, etc.) > (or socket(), or whatever) would be where the check for filesystem > modifications. but fwrite(3) does. And if fwrite(3) modifies the file system, I expect the same from write(2). Roland From reichert at numachi.com Fri Apr 25 12:34:45 2003 From: reichert at numachi.com (Brian Reichert) Date: Wed Mar 22 17:10:07 2006 Subject: [splint-discuss] problem using splint-3.0.1.6 on NetBSD In-Reply-To: <20030425134059.GB22513@burse.uni-hamburg.de> References: <1904780000.1051214185@blues.viagenie.qc.ca> <20030424204309.GA17016@burse.uni-hamburg.de> <20030424214215.GF53668@numachi.com> <20030425134059.GB22513@burse.uni-hamburg.de> Message-ID: <20030425163445.GI53668@numachi.com> On Fri, Apr 25, 2003 at 03:41:00PM +0200, roland.illig@gmx.de wrote: > On Thu, Apr 24, 2003 at 05:42:15PM -0400, Brian Reichert wrote: > > But write(2) doesn't modify filesytems, neccessarily. If writes > > output to a file descriptor. Your open() semantics (O_CREAT, etc.) > > (or socket(), or whatever) would be where the check for filesystem > > modifications. > > but fwrite(3) does. And if fwrite(3) modifies the file system, I expect > the same from write(2). fwrite(3) writes to a stream descriptor. Where you got it, and how, would dictate whether writing to it would modify a filesystem, eg. fopen(3), fdopen(3). The latter accepts a file descriptor, as would be created by open(2), hence my argument concerning write(2) would apply for fwrite(3). Again, I feel _that's_ the layer the check should be made (of one should be made at all). > > Roland > -- Brian 'you Bastard' Reichert 37 Crystal Ave. #303 Daytime number: (603) 434-6842 Derry NH 03038-1713 USA BSD admin/developer at large From evans at cs.virginia.edu Fri Apr 25 12:41:01 2003 From: evans at cs.virginia.edu (David Evans) Date: Wed Mar 22 17:10:07 2006 Subject: [splint-discuss] problem using splint-3.0.1.6 on NetBSD In-Reply-To: <1904780000.1051214185@blues.viagenie.qc.ca> References: <1904780000.1051214185@blues.viagenie.qc.ca> Message-ID: > I haven't found any information in the mailing list archive in reference to > this problem (http://www.mail-archive.com/lclint-interest%40virginia.edu/) > (BTW, most recent message date back to 12/02/2002. Is the archive broken?) > The archive has moved (when the list moved). The current archive is: http://www.splint.org/pipermail/splint-discuss/ which should be up-to-date, but doesn't not include messages before the list moved. --- Dave From Florent.Parent at hexago.com Fri Apr 25 14:06:37 2003 From: Florent.Parent at hexago.com (Florent Parent) Date: Wed Mar 22 17:10:07 2006 Subject: [splint-discuss] problem using splint-3.0.1.6 on NetBSD In-Reply-To: References: <1904780000.1051214185@blues.viagenie.qc.ca> Message-ID: <2080690000.1051293997@blues.viagenie.qc.ca> got it. Thanks. Suggestion: add a link to that archive on http://www.splint.org/lists.html Florent --On Friday, April 25, 2003 12:41:01 -0400 David Evans wrote: > >> I haven't found any information in the mailing list archive in reference >> to this problem >> (http://www.mail-archive.com/lclint-interest%40virginia.edu/) (BTW, most >> recent message date back to 12/02/2002. Is the archive broken?) >> > > The archive has moved (when the list moved). The current archive is: > http://www.splint.org/pipermail/splint-discuss/ > which should be up-to-date, but doesn't not include messages before the > list moved. > > --- Dave > From Simon.Hosie at connexionz.co.nz Sun Apr 27 17:46:35 2003 From: Simon.Hosie at connexionz.co.nz (Simon Hosie) Date: Wed Mar 22 17:10:07 2006 Subject: [splint-discuss] problem using splint-3.0.1.6 on NetBSD Message-ID: Brian Reichert: > But write(2) doesn't modify filesytems, neccessarily. If writes > output to a file descriptor. Your open() semantics (O_CREAT, etc.) > (or socket(), or whatever) would be where the check for filesystem > modifications.