mirror of
https://github.com/aljazceru/lightning.git
synced 2026-02-02 20:54:23 +01:00
tests: valgrind barfing on uninitialized value
------------------------------- Valgrind errors --------------------------------
Valgrind error file: valgrind-errors.493330
==493330== Conditional jump or move depends on uninitialised value(s)
==493330== at 0x154051: opt_add_addr_withtype (options.c:275)
==493330== by 0x154406: opt_add_announce_addr (options.c:302)
==493330== by 0x2696E6: parse_one (parse.c:121)
==493330== by 0x25CFB5: opt_parse (opt.c:228)
==493330== by 0x155DB6: handle_opts (options.c:1413)
==493330== by 0x127317: main (lightningd.c:994)
==493330==
{
<insert_a_suppression_name_here>
Memcheck:Cond
fun:opt_add_addr_withtype
fun:opt_add_announce_addr
fun:parse_one
fun:opt_parse
fun:handle_opts
fun:main
}
--------------------------------------------------------------------------------
Leaving base_dir /tmp/ltests-iyf2dw3n intact, it still has test sub-directories with failure details: ['test_announce_dns_without_port_1']
====================================== short test summary info ======================================
ERROR tests/test_gossip.py::test_announce_dns_without_port - ValueError:
This commit is contained in:
@@ -337,6 +337,7 @@ bool separate_address_and_port(const tal_t *ctx, const char *arg,
|
||||
*port = strtol(portcolon + 1, &endp, 10);
|
||||
return *port != 0 && *endp == '\0';
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -226,6 +226,8 @@ static char *opt_add_addr_withtype(const char *arg,
|
||||
assert(arg != NULL);
|
||||
dns_ok = !ld->always_use_proxy && ld->config.use_dns;
|
||||
|
||||
/* Will be overridden in next call iff has port */
|
||||
port = 0;
|
||||
if (!separate_address_and_port(tmpctx, arg, &address, &port))
|
||||
return tal_fmt(NULL, "Unable to parse address:port '%s'", arg);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user