mysql-udf-http icon indicating copy to clipboard operation
mysql-udf-http copied to clipboard

Invalid free() / delete / delete[] / realloc()

Open sbester opened this issue 8 years ago • 1 comments

Problem --------- Compiled UDF and loaded into 5.7.17.

==12629== Invalid free() / delete / delete[] / realloc()
==12629==    at 0x4C2AD17: free (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==12629==    by 0x29566419: http_delete_deinit (mysql-udf-http.c:338)
==12629==    by 0x85CF82: udf_handler::cleanup() (item_func.cc:4363)
==12629==    by 0x85D027: Item_udf_func::cleanup() (item_func.cc:4686)
==12629==    by 0xCAC5AF: delete_self (item.h:2122)
==12629==    by 0xCAC5AF: Query_arena::free_items() (sql_class.cc:3391)
==12629==    by 0xCB1306: THD::cleanup_after_query() (sql_class.cc:2303)
==12629==    by 0xCF91D5: mysql_parse(THD*, Parser_state*) (sql_parse.cc:5634)
==12629==    by 0xCFA627: dispatch_command(THD*, COM_DATA const*, enum_server_command) (sql_parse.cc:1461)
==12629==    by 0xCFB4C3: do_command(THD*) (sql_parse.cc:999)
==12629==    by 0xDC858B: handle_connection (connection_handler_per_thread.cc:300)
==12629==    by 0xF7DF43: pfs_spawn_thread (pfs.cc:2188)
==12629==    by 0x4E3CDF4: start_thread (pthread_create.c:308)
==12629==    by 0x61AD60C: clone (clone.S:113)
==12629==  Address 0xabababababababab is not stack'd, malloc'd or (recently) free'd

How to repeat ---------------- Launch mysqld in valgrind. Run the following SQL;

select http_delete(st_polygonfromtext(1));

sbester avatar Dec 30 '16 13:12 sbester

Hi. Could you send a patch for this issue?

y-ken avatar Jan 05 '17 10:01 y-ken