[splint-discuss] How to introduce new checks
Kay Dohmann
kay at dohmanngmbh.de
Thu May 14 02:50:55 PDT 2009
Hi all!
Splint is a great tool and it helped me a lot in my programming. But now
I need your help to realize an idea.
As far as I understand you can extend the behaviour of Splint via .mts
files (described a bit in section 10 of the manual).
What I wanted to do is to introduce a "blocking" state. I want to be
able to annotate functions as nonblocking and those functions would only
be allowed to call other nonblocking functions.
So I created a blocking.mts file like this:
attribute blockingness
context clause
oneof blocking, nonblocking
annotations
blocking clause ==> blocking
nonblocking clause ==> nonblocking
transfers
blocking as nonblocking ==> error "Blocking section inside a
nonblocking section."
merge
blocking + nonblocking ==> blocking
defaults
clause ==> blocking
end
When I try to use this definition with
splint -mts blocking.mts source.c <...>
then splint crashes:
F:\splint\src\ctypeList.c:72: at source point
splint.rc:23:15: *** Internal Bug at F:\splint\src\ctypeList.c:72:
llassert failed: ctypeList_isDefined (s) [errno: 0]
*** Please report bug to splint-bug at splint.org ***
(attempting to continue, results may be incorrect)
*** Segmentation Violation
*** Location (not trusted): splint.rc:23:15
*** Last code point: F:\splint\src\llmain.c:433
*** Previous code point: F:\splint\src\llmain.c:407
*** Please report bug to splint-bug at splint.org
(Yeah, in fact the '-mts blocking.mts' is inside of a splint.rc file,
but adding this was the only change in the splint.rc file.)
Can anybody give me a hint what I could have done wrong?
Thanks for your help!
Best Regards,
Kay Dohmann
More information about the splint-discuss
mailing list