On Wed Aug 14 07:16:37 2024 +0000, Alistair Leslie-Hughes wrote:
First, it's using NULL as an offset to a pointer structure
descriptor *create_descriptor( struct statement *stmt ) ... init_object( &ret->hdr, SQL_HANDLE_DESC, &stmt->hdr ); Second a crash in set_desc_rec_win32, assumes that win32_funcs is valid. SQLSetDescRec ... struct descriptor *desc = (struct descriptor *)lock_object( DescriptorHandle, SQL_HANDLE_DESC ); -> set_desc_rec_win32(desc) -> -> desc->hdr.win32_funcs->SQLSetDescRec
hdr is the first field so &stmt->hdr is NULL when stmt is NULL. win32_funcs should be set in alloc_handle(). If that's not the case then there must be a bug somewhere else. Can you show you are calling these funtions?