Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
3.0.2
-
None
-
archlinux kernel 5.2.13
gcc (GCC) 9.1.0
mariadb 10.7.3 downloaded and compiled on host
same behavior on upgraded version 10.4.8
Description
i'm using mariadb c-connector with prepare, bind and execute. it works usualy. but one case end up in "corrupted unsorted chunks" and core dumping when freeing bind buffer. i suggest the whole malloc organisation is messed up after calling mysql_stmt_execute(). my test's MysqlDynamic.c show:
- the problem only is connected to x509cert variable bound by bnd[9]
- freeing memory only fails if bnd[9].is_null = 0, if is_null execute end normally
- freeing memory (using FreeStmt()) after bind and before execute end normally
- print of bnd[9].buffer before execute show (void*) is connected to the correct string buffer
- same behavior for setting bnd[9].buffer_length to STMT_INDICATOR_NTS or strlen()
- other similar bindings (picture, bnd[10]) do not lead to corrupted memory and core dump.
for more detailed explanation please see link stackoverflow.
i'm opening this issue after i did not get any useful answers.
please verify code MysqlDynamic.c and compile it. i especialy wrote for debugging purposes after running randomly into troubles. please let me know if <MysqlDynamic -i> run without problems.
thank you