cee-studio / cee-utils

The repo for common utility functions used by cee.studio
MIT License
3 stars 1 forks source link

ja_str_list_free attempts invalid free() #7

Open lcsmuller opened 3 years ago

lcsmuller commented 3 years ago
==28482== Invalid free() / delete / delete[] / realloc()
==28482==    at 0x483CA3F: free (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==28482==    by 0x10B01E: ja_str_free (json-actor-boxed.c:37)
==28482==    by 0x115AC4: ntl_free (ntl.c:129)
==28482==    by 0x10B17E: ja_str_list_free (json-actor-boxed.c:64)
==28482==    by 0x10AD2D: load_search_params (test-reddit-api.c:53)
==28482==    by 0x10AE1B: main (test-reddit-api.c:73)
==28482==  Address 0x6a36158 is 24 bytes inside a block of size 40 alloc'd
==28482==    at 0x483B7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==28482==    by 0x1157BD: ntl_malloc_init (ntl.c:27)
==28482==    by 0x1158BB: ntl_calloc_init (ntl.c:65)
==28482==    by 0x11625D: ntl_from_buf (ntl.c:342)
==28482==    by 0x11566D: orka_str_to_ntl (orka-utils.c:248)
==28482==    by 0x10B21A: ja_str_list_from_json (json-actor-boxed.c:78)
==28482==    by 0x112C5E: apply_extraction (json-actor.c:2182)
==28482==    by 0x112D13: extract_value (json-actor.c:2207)
==28482==    by 0x11312F: extract_access_path (json-actor.c:2280)
==28482==    by 0x113355: extract_object_value (json-actor.c:2319)
==28482==    by 0x113B97: json_vextract (json-actor.c:2453)
==28482==    by 0x113D6F: json_extract (json-actor.c:2474)

To replicate issue remove comment block from test-reddit-api.c:53

mlite commented 3 years ago

@LucasMull It's not clear why this free is invalid from this message. Can you please use stensal-c to build and report the error message?