With that version of Purify (7.0.1-ish on Solaris SPARC) following option syntax works:
$ purify -cache-dir=purify_cache -always-use-cache-dir \
-enable-exclude -exclude-libs=libclntsh.so.11.1 cc ...
Purify then still prints something about instrumentalizing libclntsh.so.11.1 but it is finished way faster and creates a _p0_
file:
$ find purify_cache -name '*_pp0_*'
purify_cache/.../lib/libclntsh.so.11.1_pure_pp0_pc0_0_0_1009171813_510_64
Advantages:
- exclude yields faster instrumentalization times if you just need to instrumentalize other parts of the code
- works around Illegal Instruction crashes with Purify and Oracle libraries
Disadvantage:
- memory errors inside the excluded library (because of wrong input data to those library functions) are not detected any more.
Purify uses :
as delimiter in values supplied to the -exclude-libs
option, i.e. you can specify multiple libraries for exclusion (e.g. -exclude-libs=foo.so:bar.so
).