Instrumentalizing C Code that is linked against Oracle's libclntsh leads to crashes when running the resulting program. The program is terminated with a 'Illegal Instruction' signal.
The bug is present for at least some versions of Oracle 11g and Purify.
This is a known bug and IBM has published a workaround. Unfortunately, the workaround does not help in my work environment.
I am using
$ purify -version
Version 7.0.1.0-002.U 120210 Solaris SPARC
under Solaris 10 on Sun SPARC hardware. I compile the C source with Sun CC 11.
Like described in the workaround I've tried excluding libclntsh from instrumentalization like this:
$ purify -verbose -cache-dir=purify_cache -always-use-cache-dir \
-selective -exclude-libs=/oracle/app/rdbms/ora11203/lib/libclntsh.so.11.1 \
cc -o myprogram ... -lclntsh
This does not work. Purify just says that it is instrumenting libclntsh.so.11.1, and surely enough I get a corresponding _pp3_
file and not a _pp0_
one.
I tried variations of the exclude pattern:
-exclude-libs=libclntsh.so.11.1
-exclude-libs=clntsh.so
Without any success.
Being able to exclude libclntsh would also greatly the instrumentalization time. On this SPARC machine it takes several minutes to instrumentalize libclntsh.so.
Looking at the workaround, it just mentions HPUX - but I hope it is also applicable under Solaris ... somehow.
With that version of Purify (7.0.1-ish on Solaris SPARC) following option syntax works:
Purify then still prints something about instrumentalizing libclntsh.so.11.1 but it is finished way faster and creates a
_p0_
file:Advantages:
Disadvantage:
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
).