[OpenWrt-Devel] [PATCH] uci: test: use valgrind to detect memory corruptions

Sven Eckelmann sven at narfation.org
Fri May 17 08:09:42 EDT 2019


On Friday, 17 May 2019 11:44:25 CEST Charlemagne Lasse wrote:
> uci is currently a highly problematic software and its library & lua
> bindings cannot be used without corrupting or leaking memory

heap-use-after-free - yes. But I cannot find the memory leak report/test. This 
is what I am currently searching for in some downstream project.

The test scripts work fine after adding 
https://patchwork.ozlabs.org/patch/1100999/

    #
    # Performing tests
    #
    test_import
    test_export
    test_get_parsing
    test_get_section_index_parsing
    test_get_option
    test_get_option_multiline
    test_get_section
    test_set_parsing
    test_set_named_section
    test_set_nonexisting_option
    test_set_nonexisting_option_multiline
    test_set_existing_option
    test_set_existing_option_multiline
    test_add_section
    test_get_parsing
    test_get_parsing_multiline_package
    test_get_parsing_multiline_section
    test_get_parsing_multiline_option
    test_batch_set
    test_batch_comments
    test_revert_section
    test_revert_option
    test_revert_option_multiline
    test_revert_option_long
    test_add_list_config
    test_add_list_get
    test_add_list_show
    test_add_list_changes
    test_del_list
    test_del_list_multiline
    test_add_delta
    test_changes_tailing_parts
    test_changes_missing_value
    
    #
    # Test report
    #
    tests passed:   112 100%
    tests failed:     0   0%
    tests skipped:    0   0%
    tests total:    112 100%

> To notice such problems faster, start the uci testsuite with the
> valgrind memory checker.

Patch doesn't apply (adding it manually works).

Kind regards,
	Sven
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20190517/4d42259c/attachment.sig>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list