-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add script for running valgrind and a suppressions file to prevent sp…
…urious errors, or ones that are part of OCI and cannot be resolved in any case, as suggested in issue #29.
- Loading branch information
1 parent
607be2b
commit 8dac85e
Showing
2 changed files
with
268 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#------------------------------------------------------------------------------ | ||
# Copyright (c) 2017 Oracle and/or its affiliates. All rights reserved. | ||
# This program is free software: you can modify it and/or redistribute it | ||
# under the terms of: | ||
# | ||
# (i) the Universal Permissive License v 1.0 or at your option, any | ||
# later version (http://oss.oracle.com/licenses/upl); and/or | ||
# | ||
# (ii) the Apache License v 2.0. (http://www.apache.org/licenses/LICENSE-2.0) | ||
# | ||
#------------------------------------------------------------------------------ | ||
# | ||
# Sample script for running valgrind. | ||
# | ||
#------------------------------------------------------------------------------ | ||
|
||
echo "Running valgrind on $1..." | ||
|
||
valgrind \ | ||
--num-callers=40 \ | ||
--error-markers=-------------------------,------------------------- \ | ||
--redzone-size=256 \ | ||
--leak-check=yes \ | ||
--track-origins=yes \ | ||
--free-fill=0xaa \ | ||
--leak-check=full \ | ||
--error-limit=no \ | ||
--trace-children=yes \ | ||
--show-leak-kinds=definite,possible \ | ||
--suppressions=$(dirname $0)/suppressions.txt \ | ||
--gen-suppressions=all \ | ||
$@ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,235 @@ | ||
#------------------------------------------------------------------------------ | ||
# Copyright (c) 2017 Oracle and/or its affiliates. All rights reserved. | ||
# This program is free software: you can modify it and/or redistribute it | ||
# under the terms of: | ||
# | ||
# (i) the Universal Permissive License v 1.0 or at your option, any | ||
# later version (http://oss.oracle.com/licenses/upl); and/or | ||
# | ||
# (ii) the Apache License v 2.0. (http://www.apache.org/licenses/LICENSE-2.0) | ||
# | ||
#------------------------------------------------------------------------------ | ||
# | ||
# List of valgrind suppressions for ODPI-C library. Errors reported from within | ||
# OCI are ignored as these cannot be resolved by ODPI-C. | ||
# | ||
# Errors expected from the test suite are also ignored. | ||
#------------------------------------------------------------------------------ | ||
|
||
#------------------------------------------------------------------------------ | ||
# OCI ERRORS | ||
#------------------------------------------------------------------------------ | ||
{ | ||
suppress_oci_cond | ||
Memcheck:Cond | ||
... | ||
obj:*/*clntsh* | ||
... | ||
} | ||
|
||
{ | ||
suppress_oci_leak | ||
Memcheck:Leak | ||
... | ||
obj:*/*clntsh* | ||
... | ||
} | ||
|
||
{ | ||
suppress_oci_value8 | ||
Memcheck:Value8 | ||
... | ||
obj:*/*clntsh* | ||
... | ||
} | ||
|
||
{ | ||
suppress_oci_addr1 | ||
Memcheck:Addr1 | ||
... | ||
obj:*/*clntsh* | ||
... | ||
} | ||
|
||
{ | ||
suppress_oci_addr16 | ||
Memcheck:Addr16 | ||
... | ||
obj:*/*clntsh* | ||
... | ||
} | ||
|
||
{ | ||
suppress_OCIPasswordChange_param | ||
Memcheck:Param | ||
write(buf) | ||
... | ||
fun:OCIPasswordChange | ||
... | ||
} | ||
|
||
{ | ||
suppress_OCIStmtExecute_param | ||
Memcheck:Param | ||
write(buf) | ||
... | ||
fun:OCIStmtExecute | ||
... | ||
} | ||
|
||
{ | ||
suppress_OCISubscriptionUnRegister_param | ||
Memcheck:Param | ||
write(buf) | ||
... | ||
fun:dpiOci__subscriptionUnRegister | ||
... | ||
} | ||
|
||
{ | ||
suppress_OCITransStart_param | ||
Memcheck:Param | ||
write(buf) | ||
... | ||
fun:dpiOci__transStart | ||
... | ||
} | ||
|
||
{ | ||
suppress_OCIEnvNlsCreate_leak | ||
Memcheck:Leak | ||
... | ||
fun:OCIEnvNlsCreate | ||
... | ||
} | ||
|
||
{ | ||
suppress_OCIServerAttach_leak | ||
Memcheck:Leak | ||
... | ||
fun:OCIServerAttach | ||
... | ||
} | ||
|
||
|
||
#------------------------------------------------------------------------------ | ||
# EXPECTED TEST SUITE ERRORS | ||
#------------------------------------------------------------------------------ | ||
{ | ||
suppress_test_105_addr4 | ||
Memcheck:Addr4 | ||
fun:dpiContext__startPublicFn | ||
fun:dpiContext_destroy | ||
fun:dpiTest_105_destroyTwice | ||
... | ||
} | ||
|
||
{ | ||
suppress_test_306_addr8 | ||
Memcheck:Addr8 | ||
fun:dpiGen__checkHandle | ||
fun:dpiConn_create | ||
fun:dpiTest_306_createInvalidPool | ||
... | ||
} | ||
|
||
{ | ||
suppress_test_309_addr8 | ||
Memcheck:Addr8 | ||
fun:dpiGen__checkHandle | ||
fun:dpiGen__startPublicFn | ||
fun:dpiGen__release | ||
fun:dpiTest_309_createReleaseTwice | ||
... | ||
} | ||
|
||
{ | ||
suppress_test_511_addr8 | ||
Memcheck:Addr8 | ||
fun:dpiGen__checkHandle | ||
fun:dpiGen__startPublicFn | ||
fun:dpiGen__release | ||
fun:dpiTest_511_releaseTwice | ||
... | ||
} | ||
|
||
{ | ||
suppress_test_1100_addr8 | ||
Memcheck:Addr8 | ||
fun:dpiGen__checkHandle | ||
fun:dpiGen__startPublicFn | ||
fun:dpiGen__release | ||
fun:dpiTest_1100_releaseTwice | ||
... | ||
} | ||
|
||
{ | ||
suppress_test_1302_addr8 | ||
Memcheck:Addr8 | ||
fun:dpiGen__checkHandle | ||
fun:dpiGen__startPublicFn | ||
fun:dpiGen__release | ||
fun:dpiTest_1302_releaseObjTypeTwice | ||
... | ||
} | ||
|
||
{ | ||
suppress_test_1400_addr8 | ||
Memcheck:Addr8 | ||
fun:dpiGen__checkHandle | ||
fun:dpiGen__startPublicFn | ||
fun:dpiGen__release | ||
fun:dpiTest_1400_releaseObjTwice | ||
... | ||
} | ||
|
||
{ | ||
suppress_test_1500_addr8 | ||
Memcheck:Addr8 | ||
fun:dpiGen__checkHandle | ||
fun:dpiGen__startPublicFn | ||
fun:dpiGen__release | ||
fun:dpiTest_1500_releaseEnqOptionsTwice | ||
... | ||
} | ||
|
||
{ | ||
suppress_test_1600_addr8 | ||
Memcheck:Addr8 | ||
fun:dpiGen__checkHandle | ||
fun:dpiGen__startPublicFn | ||
fun:dpiGen__release | ||
fun:dpiTest_1600_releaseDeqOptionsTwice | ||
... | ||
} | ||
|
||
{ | ||
suppress_test_1700_addr8 | ||
Memcheck:Addr8 | ||
fun:dpiGen__checkHandle | ||
fun:dpiGen__startPublicFn | ||
fun:dpiGen__release | ||
fun:dpiTest_1700_releaseMsgPropsTwice | ||
... | ||
} | ||
|
||
{ | ||
suppress_test_1902_addr8 | ||
Memcheck:Addr8 | ||
fun:dpiGen__checkHandle | ||
fun:dpiGen__startPublicFn | ||
fun:dpiGen__release | ||
fun:dpiTest_1902_releaseLobTwice | ||
... | ||
} | ||
|
||
{ | ||
suppress_test_2002_addr8 | ||
Memcheck:Addr8 | ||
fun:dpiGen__checkHandle | ||
fun:dpiGen__startPublicFn | ||
fun:dpiGen__release | ||
fun:dpiTest_2002_releaseRowIdTwice | ||
... | ||
} | ||
|