Memory leak in Microsoft ODBC Driver 17.10.5 for SQL Server

Saki Takamachi 0 Reputation points
2023-11-07T06:55:38.81+00:00

I don't know where to report the bug, so I'll post it here. Is it okay to report bugs here? If there is a suitable place, please let me know.

The following code:

https://gist.github.com/SakiTakamachi/d812880629d9b43798397a04306c7b35

compile command:

gcc -fsanitize=leak,undefined,address -fno-sanitize-recover -DZEND_TRACK_ARENA_ALLOC -Wall -o odbc odbc.c -lodbc

exec:

# ./odbc

=================================================================
==12092==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 24 byte(s) in 1 object(s) allocated from:
    #0 0x7fd55793e587 in operator new(unsigned long) ../../../../src/libsanitizer/asan/asan_new_delete.cc:104
    #1 0x7fd5532728da  (/opt/microsoft/msodbcsql17/lib64/libmsodbcsql-17.10.so.5.1+0x1808da)

Indirect leak of 88 byte(s) in 1 object(s) allocated from:
    #0 0x7fd55793e587 in operator new(unsigned long) ../../../../src/libsanitizer/asan/asan_new_delete.cc:104
    #1 0x7fd5531fa909  (/opt/microsoft/msodbcsql17/lib64/libmsodbcsql-17.10.so.5.1+0x108909)

SUMMARY: AddressSanitizer: 112 byte(s) leaked in 2 allocation(s).

In this way, once I close the connection and connect it again, I will get a memory leak.

Regards.

SQL Server | Other
{count} votes

1 answer

Sort by: Most helpful
  1. Erland Sommarskog 122.3K Reputation points MVP Volunteer Moderator
    2023-11-07T22:47:26.3933333+00:00

    You can report bugs for SQL Server here: https://feedback.azure.com/d365community/forum/04fe6ee0-3b25-ec11-b6e6-000d3a4f0da0 The aim of this site is to let Microsoft know. There is no guarantee it will lead to a fix.

    If this is an issue for which you need a fix, you need to open a support case.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.