Message-ID: From: "progmachine (@progmachine)" To: "postgresql-interfaces/psqlodbc" Date: Wed, 15 May 2024 15:20:52 +0000 Subject: Re: [postgresql-interfaces/psqlodbc] issue #8: Memory leaks detected in psqlodbc library In-Reply-To: References: List-Id: X-GitHub-Author-Login: progmachine X-GitHub-Comment-Id: 2112843127 X-GitHub-Comment-Type: issue_comment X-GitHub-Edited-At: 2024-05-15T15:28:12Z X-GitHub-Issue: 8 X-GitHub-Repo: postgresql-interfaces/psqlodbc X-GitHub-Type: comment X-GitHub-Url: https://github.com/postgresql-interfaces/psqlodbc/issues/8#issuecomment-2112843127 Content-Type: text/plain; charset=utf-8 I think it is easy to reproduce: 1. Create two statements within one connection. 2. With first statement execute select command, and get Columns info with `SQLDescribeCol` function. 3. With second statement execute `ALTER TABLE`/`DROP TABLE` sql command. This will call `CC_clear_col_info` to clear COL_INFO cache. 4. Check again column info with first statement, that should access cached COL_INFO object, that was deleted on step 3 because of your modification. But without AddressSanitizer, it can work well, until freed memory used again before step 4.