Re: FreeTDS 1.0 Released!
Dennis Luehring <[email protected]>
| Newsgroups | gmane.comp.db.tds.freetds |
|---|---|
| Message-ID | <[email protected]> |
cppcheck found some real bugs (report attached) and you should realy use adress-sanitizer (just an compile flag for gcc or clang) - everything it hits is a bug (not like valgrinds could-be-bug warnings) - the thread-sanitizer is just awesom Am 06.06.2016 um 12:31 schrieb Frediano Ziglio: > 2016-05-18 22:12 GMT+01:00 Dennis Luehring <[email protected]>: > > http://cppcheck.sourceforge.net/ found serveral small/big flaws (small > > memory leaks, out of bounds accessess etc.) > > > > are using address- and thread-sanitzer for testing? - great tools to find > > any memory access bugs > > > > Valgrind, Coverity (https://scan.coverity.com/projects/freetds2, now a > bit higher as is using master), address sanitizer for my tests. Looks > like numeric code is so complicated no tools is able to understand > there are no overflows :-) > > Frediano > > > > > Am 18.05.2016 um 22:41 schrieb Frediano Ziglio: > >> > >> Hi, > >> finally ready. Changes (from NEWS file) > >> > >> > >> User visible (not in a particular order): > >> - Removed "8.0" from protocol version string accepted. Please > >> update configuration files; > >> - Default protocol version is now auto. This could slow down > >> connection but make user experience less painful; > >> - Sybase encrypted login. Set encryption to get it; > >> - Support protocol version 7.4; > >> - Add intent support to specify we don't want to change data; > >> - Allow to attach database file during the login (MS SQL Server); > >> - Support for Sybase time/date/bigdate/bigdatetime; > >> - Pool is working again; > >> - ODBC BCP (not complete); > >> - Improved dbconvert and dbconvert_ps (more compatible); > >> - Fixed dbspid; > >> - Improved ODBC type information; > >> - Better certificate verification; > >> - AppVeyor is used for every build; > >> - Try all IPs from DNS. This allows SQL Cluster connection > >> to secondary servers. > >> > >> Implementation: > >> - Removed Nmake support; > >> - Type conversions simplified; > >> - Better type handle code. > >> > >> > >> Frediano > _______________________________________________ > FreeTDS mailing list > [email protected] > http://lists.ibiblio.org/mailman/listinfo/freetds _______________________________________________ FreeTDS mailing list [email protected] http://lists.ibiblio.org/mailman/listinfo/freetds
cppcheck.txt
(text/plain, 5.9 KB)
[misc\cmake_checks.c:8]: (error) No pair for character ("). Can't process file. File is either invalid or unicode, which is currently not supported.
[misc\cmake_checks.c:10]: (error) va_list 'va' used before va_start() was called.
[misc\cmake_checks.c:16]: (error) va_list 'va' used before va_start() was called.
[misc\cmake_checks.c:20]: (error) va_list 'va' used before va_start() was called.
[misc\cmake_checks.c:18]: (error) va_list 'va' used before va_start() was called.
[src\apps\datacopy.c:794]: (error) Memory leak: srcdata
[src\ctlib\cs.c:78]: (warning) %u in format string (no. 1) requires 'unsigned int' but the argument type is 'int'.
[src\ctlib\ct.c:3273] -> [src\ctlib\ct.c:3278]: (warning) Either the condition 'cmd==0' is redundant or there is possible null pointer dereference: cmd.
[src\ctlib\unittests\common.c:295]: (error) Buffer is accessed out of bounds.
[src\ctlib\unittests\ct_dynamic.c:55]: (warning) vfprintf format string requires 0 parameters but 1 is given.
[src\ctlib\unittests\rpc_ct_param.c:357]: (error) Memory leak: coldata
[src\ctlib\unittests\rpc_ct_setparam.c:402]: (error) Memory leak: coldata
[src\dblib\dblib.c:1592]: (warning) %u in format string (no. 1) requires 'unsigned int' but the argument type is 'int'.
[src\dblib\dblib.c:1622]: (warning) %u in format string (no. 1) requires 'unsigned int' but the argument type is 'int'.
[src\dblib\dblib.c:1647]: (warning) %u in format string (no. 1) requires 'unsigned int' but the argument type is 'int'.
[src\dblib\buffering.h:261]: (warning) Assert statement modifies 'ii'.
[src\dblib\unittests\done_handling.c:44]: (warning) %u in format string (no. 1) requires 'unsigned int' but the argument type is 'int'.
[src\dblib\unittests\done_handling.c:58]: (warning) %u in format string (no. 1) requires 'unsigned int' but the argument type is 'int'.
[src\dblib\unittests\t0013.c:245]: (error) Common realloc mistake: 'rblob' nulled but not freed upon failure
[src\dblib\unittests\t0013.c:118]: (error) Memory leak: blob
[src\dblib\unittests\t0014.c:212]: (error) Common realloc mistake: 'rblob' nulled but not freed upon failure
[src\dblib\unittests\t0016.c:68]: (warning) %d in format string (no. 2) requires 'int' but the argument type is 'unsigned int'.
[src\odbc\connectparams.c:833]: (warning) Assignment of function parameter has no effect outside the function. Did you forget dereferencing it?
[src\odbc\odbc.c:1729]: (error) Dereferencing 'stmt' after it is deallocated / released
[src\odbc\odbc.c:1730]: (error) Dereferencing 'stmt' after it is deallocated / released
[src\odbc\odbc.c:7352]: (error) va_list 'marker' used before va_start() was called.
[src\odbc\odbc_util.c:1077]: (error) syntax error
[src\odbc\unittests\binary_test.c:146]: (warning) %d in format string (no. 2) requires 'int' but the argument type is 'unsigned int'.
[src\odbc\unittests\blob1.c:97]: (warning) %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'.
[src\odbc\unittests\blob1.c:141]: (warning) %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'.
[src\odbc\unittests\blob1.c:316]: (warning) %d in format string (no. 2) requires 'int' but the argument type is 'unsigned int'.
[src\odbc\unittests\blob1.c:320]: (warning) %d in format string (no. 2) requires 'int' but the argument type is 'unsigned int'.
[src\odbc\unittests\blob1.c:324]: (warning) %d in format string (no. 2) requires 'int' but the argument type is 'unsigned int'.
[src\odbc\unittests\testodbc.c:403]: (warning) %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'.
[src\odbc\unittests\testodbc.c:417]: (warning) %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'.
[src\odbc\unittests\testodbc.c:419]: (warning) %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'.
[src\odbc\unittests\testodbc.c:419]: (warning) %d in format string (no. 2) requires 'int' but the argument type is 'unsigned int'.
[src\replacements\vasprintf.c:131]: (error) Memory leak: buf
[src\replacements\strlcat.c:40] -> [src\replacements\unittests\strings.c:73]: (error) Modifying string literal "xyz" directly or indirectly is undefined behaviour.
[src\server\query.c:51]: (error) Common realloc mistake: 'query' nulled but not freed upon failure
[src\server\query.c:109]: (error) Common realloc mistake: 'query' nulled but not freed upon failure
[src\server\query.c:126]: (error) Common realloc mistake: 'query' nulled but not freed upon failure
[src\server\query.c:172]: (error) Common realloc mistake: 'query' nulled but not freed upon failure
[src\tds\bulk.c:510]: (error) syntax error
[src\tds\convert.c:1078]: (warning) %lu in format string (no. 2) requires 'unsigned long' but the argument type is 'signed long'.
[src\tds\numeric.c:182] -> [src\tds\numeric.c:178]: (warning) Either the condition '!n' is redundant or there is division by zero at line 178.
[src\tds\numeric.c:182] -> [src\tds\numeric.c:180]: (warning) Either the condition '!n' is redundant or there is division by zero at line 180.
[src\tds\sec_negotiate_gnutls.h:318]: (warning) Possible null pointer dereference: nonce
[src\tds\sec_negotiate_openssl.h:65]: (warning) Possible null pointer dereference: nonce
[src\tds\tdsstring.c:88]: (error) Memory leak: p
[src\tds\tdsstring.c:170]: (error) Memory leak: p
[src\tds\token.c:1943]: (warning) Obsolete function 'alloca' called. In C99 and later it is recommended to use a variable length array instead.
[src\tds\token.c:2444]: (error) Common realloc mistake: 's' nulled but not freed upon failure
[src\tds\unittests\charconv.c:315] -> [src\tds\unittests\charconv.c:322]: (warning) Either the condition '!ctx' is redundant or there is possible null pointer dereference: ctx.
[src\tds\unittests\t0004.c:57]: (error) Memory leak: long_query
[vms\vmsarg_parse.c:533]: (error) Buffer is accessed out of bounds: month_2
[vms\vmsarg_parse.c:677]: (error) Array 'quote_string[1]' accessed at index 1, which is out of bounds.