• 10 dec 2017: forum version update. In case of issues use this topic.
  • 30 nov 2017: pilight moved servers. In case of issues use this topic.
Hello There, Guest! Login Register


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rewrite unit tests
#11
GCC:
Code:
martin@linux-027e:~/builds/pilight/rewrite> gcc --version
gcc (SUSE Linux) 4.8.3 20140627 [gcc-4_8-branch revision 212064]
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

libunwind (1.1):
Code:
martin@linux-027e:~/builds/pilight/rewrite> zypper se -is libunwind
Loading repository data...
Reading installed packages...

S | Name            | Type    | Version    | Arch   | Repository          
--+-----------------+---------+------------+--------+---------------------
i | libunwind       | package | 1.1-10.3.1 | x86_64 | openSUSE-13.2-Update
i | libunwind-devel | package | 1.1-10.3.1 | x86_64 | openSUSE-13.2-Update

libpcap (1.6.2):
Code:
martin@linux-027e:~/builds/pilight/rewrite> zypper se -is libpcap
Loading repository data...
Reading installed packages...

S | Name           | Type    | Version   | Arch   | Repository      
--+----------------+---------+-----------+--------+------------------
i | libpcap-devel  | package | 1.6.2-1.2 | x86_64 | openSUSE-13.2-Oss
i | libpcap1       | package | 1.6.2-1.2 | x86_64 | openSUSE-13.2-Oss
i | libpcap1-32bit | package | 1.6.2-1.2 | x86_64 | openSUSE-13.2-Oss

glibc version 2.19
libgthread version 2.42.2
 
Reply
#12
I setup the exact same build environment and got no issues (at least no segfaults).

Some test fail, but i believe that's due to firewall.


Indeed firewall issue. Turn it off for SSDP to succeed and stop ntpd for the ntp test to succeed:
Code:
rcntp stop
SuSEfirewall2 off
 
Reply
#13
Sometimes I'm getting the corrupted double-linked list segfault, other times it runs fine until it fails here:
Code:
martin@linux-027e:~/builds/pilight/rewrite>  ./pilight-unittest
[ test_explode                                     ]
[ test_nrcpu                                       ]
[ test_isrunning                                   ]
[ test_isnummeric                                  ]
[ test_name2uid                                    ]
[ test_strstr                                      ]
[ test_ishex                                       ]
[ test_urldecode                                   ]
[ test_urlencode                                   ]
[ test_base64decode                                ]
[ test_base64encode                                ]
[ test_hostname                                    ]
[ test_distroname                                  ]
[ test_file_exists                                 ]
[ test_path_exists                                 ]
[ test_vercmp                                      ]
[ test_uniq_space                                  ]
[ test_str_replace                                 ]
[ test_stricmp                                     ]
[ test_file_get_contents                           ]
[ test_inet_devs                                   ]
[ test_dev2mac                                     ]
[ test_host2ip                                     ]
[ test_whitelist_check                             ]
[ test_binary                                      ]
[ test_coord2tz                                    ]
[ test_datetime2ts                                 ]
[ test_localtime_l                                 ]
[ test_datefix                                     ]
[ test_json_encode                                 ]
[ test_json_decode                                 ]
[ test_sha256cache                                 ]
[ test_strptime                                    ]
[ test_options_valid                               ]
[ test_options_invalid                             ]
[ test_options_merge                               ]
[ test_dso                                         ]
[ test_eventpool_callback_nothreads                ]
[ test_eventpool_callback_threaded                 ]
[ test_log                                         ]
(/home/martin/builds/pilight/rewrite/tests/log.c #42) [Jan 06 14:35:03:313052] emergency
(/home/martin/builds/pilight/rewrite/tests/log.c #43) [Jan 06 14:35:03:313249] alert
(/home/martin/builds/pilight/rewrite/tests/log.c #44) [Jan 06 14:35:03:313311] critical
(/home/martin/builds/pilight/rewrite/tests/log.c #45) [Jan 06 14:35:03:313364] ERROR: test
(/home/martin/builds/pilight/rewrite/tests/log.c #46) [Jan 06 14:35:03:313413] WARNING: test
(/home/martin/builds/pilight/rewrite/tests/log.c #47) [Jan 06 14:35:03:313464] NOTICE: test
(/home/martin/builds/pilight/rewrite/tests/log.c #48) [Jan 06 14:35:03:313511] INFO: test
(/home/martin/builds/pilight/rewrite/tests/log.c #49) [Jan 06 14:35:03:313558] DEBUG: test
DEBUG: garbage collected log library
[ test_ssdp_client                                 ]
[ test_ssdp_server                                 ]
[ test_ntp                                         ]
[ test_ping_localhost                              ]
[ test_ping_timeout                                ]
[ test_ping_response                               ]
[ test_http                                        ]
pilight-unittest: malloc.c:2369: sysmalloc: Assertion `(old_top == (((mbinptr) (((char *) &((av)->bins[((1) - 1) * 2])) - __builtin_offsetof (struct malloc_chunk, fd)))) && old_size == 0) || ((unsigned long) (old_size) >= (unsigned long)((((__builtin_offsetof (struct malloc_chunk, fd_nextsize))+((2 *(sizeof(size_t))) - 1)) & ~((2 *(sizeof(size_t))) - 1))) && ((old_top)->size & 0x1) && ((unsigned long) old_end & pagemask) == 0)' failed.
Aborted

I'm getting the segfault roughly 50% of runs, and the above issue the other 50% of times. Weird...

I've been adding two firewall rules to allow SSDP in External Zone interfaces (after assigning my NIC to the external zone) in YaST to my openSUSE installations to allow the pilight SSDP discovery traffic. Nicer than disabling my whole firewall Wink
It seems the ntp test works fine even with ntpd running.


Edit: I tried it with disabled firewall and I'm getting some very weird results. Still about half the time I'm getting the corrupted double-linked list segfault, while the other times I'm either getting the same issue as above, or one these two scenarios:

Code:
martin@linux-027e:~/builds/pilight/rewrite> ./pilight-unittest
[ test_explode                                     ]
[ test_nrcpu                                       ]
[ test_isrunning                                   ]
[ test_isnummeric                                  ]
[ test_name2uid                                    ]
[ test_strstr                                      ]
[ test_ishex                                       ]
[ test_urldecode                                   ]
[ test_urlencode                                   ]
[ test_base64decode                                ]
[ test_base64encode                                ]
[ test_hostname                                    ]
[ test_distroname                                  ]
[ test_file_exists                                 ]
[ test_path_exists                                 ]
[ test_vercmp                                      ]
[ test_uniq_space                                  ]
[ test_str_replace                                 ]
[ test_stricmp                                     ]
[ test_file_get_contents                           ]
[ test_inet_devs                                   ]
[ test_dev2mac                                     ]
[ test_host2ip                                     ]
[ test_whitelist_check                             ]
[ test_binary                                      ]
[ test_coord2tz                                    ]
[ test_datetime2ts                                 ]
[ test_localtime_l                                 ]
[ test_datefix                                     ]
[ test_json_encode                                 ]
[ test_json_decode                                 ]
[ test_sha256cache                                 ]
[ test_strptime                                    ]
[ test_options_valid                               ]
[ test_options_invalid                             ]
[ test_options_merge                               ]
[ test_dso                                         ]
[ test_eventpool_callback_nothreads                ]
[ test_eventpool_callback_threaded                 ]
[ test_log                                         ]
(/home/martin/builds/pilight/rewrite/tests/log.c #42) [Jan 06 14:49:10:16540] emergency
(/home/martin/builds/pilight/rewrite/tests/log.c #43) [Jan 06 14:49:10:16576] alert
(/home/martin/builds/pilight/rewrite/tests/log.c #44) [Jan 06 14:49:10:16594] critical
(/home/martin/builds/pilight/rewrite/tests/log.c #45) [Jan 06 14:49:10:16602] ERROR: test
(/home/martin/builds/pilight/rewrite/tests/log.c #46) [Jan 06 14:49:10:16609] WARNING: test
(/home/martin/builds/pilight/rewrite/tests/log.c #47) [Jan 06 14:49:10:16615] NOTICE: test
(/home/martin/builds/pilight/rewrite/tests/log.c #48) [Jan 06 14:49:10:16623] INFO: test
(/home/martin/builds/pilight/rewrite/tests/log.c #49) [Jan 06 14:49:10:16629] DEBUG: test
DEBUG: garbage collected log library
[ test_ssdp_client                                 ]
[ test_ssdp_server                                 ]
[ test_ntp                                         ]
[ test_ping_localhost                              ]
[ test_ping_timeout                                ]
[ test_ping_response                               ]
[ test_http                                        ]
[ test_mail                                        ]
Segmentation fault

or this one:

Code:
martin@linux-027e:~/builds/pilight/rewrite>  ./pilight-unittest
[ test_explode                                     ]
[ test_nrcpu                                       ]
[ test_isrunning                                   ]
[ test_isnummeric                                  ]
[ test_name2uid                                    ]
[ test_strstr                                      ]
[ test_ishex                                       ]
[ test_urldecode                                   ]
[ test_urlencode                                   ]
[ test_base64decode                                ]
[ test_base64encode                                ]
[ test_hostname                                    ]
[ test_distroname                                  ]
[ test_file_exists                                 ]
[ test_path_exists                                 ]
[ test_vercmp                                      ]
[ test_uniq_space                                  ]
[ test_str_replace                                 ]
[ test_stricmp                                     ]
[ test_file_get_contents                           ]
[ test_inet_devs                                   ]
[ test_dev2mac                                     ]
[ test_host2ip                                     ]
[ test_whitelist_check                             ]
[ test_binary                                      ]
[ test_coord2tz                                    ]
[ test_datetime2ts                                 ]
[ test_localtime_l                                 ]
[ test_datefix                                     ]
[ test_json_encode                                 ]
[ test_json_decode                                 ]
[ test_sha256cache                                 ]
[ test_strptime                                    ]
[ test_options_valid                               ]
[ test_options_invalid                             ]
[ test_options_merge                               ]
[ test_dso                                         ]
[ test_eventpool_callback_nothreads                ]
[ test_eventpool_callback_threaded                 ]
[ test_log                                         ]
(/home/martin/builds/pilight/rewrite/tests/log.c #42) [Jan 06 14:45:49:71249] emergency
(/home/martin/builds/pilight/rewrite/tests/log.c #43) [Jan 06 14:45:49:71319] alert
(/home/martin/builds/pilight/rewrite/tests/log.c #44) [Jan 06 14:45:49:71328] critical
(/home/martin/builds/pilight/rewrite/tests/log.c #45) [Jan 06 14:45:49:71333] ERROR: test
(/home/martin/builds/pilight/rewrite/tests/log.c #46) [Jan 06 14:45:49:71339] WARNING: test
(/home/martin/builds/pilight/rewrite/tests/log.c #47) [Jan 06 14:45:49:71346] NOTICE: test
(/home/martin/builds/pilight/rewrite/tests/log.c #48) [Jan 06 14:45:49:71352] INFO: test
(/home/martin/builds/pilight/rewrite/tests/log.c #49) [Jan 06 14:45:49:71357] DEBUG: test
DEBUG: garbage collected log library
[ test_ssdp_client                                 ]
[ test_ssdp_server                                 ]
[ test_ntp                                         ]
[ test_ping_localhost                              ]
[ test_ping_timeout                                ]
[ test_ping_response                               ]
[ test_http                                        ]
[ test_mail                                        ]
[ test_webserver_get                               ]
pilight-unittest: /home/martin/builds/pilight/rewrite/libs/libuv/unix/linux-core.c:231: uv__io_poll: Assertion `op == 1' failed.
Aborted

Don't know what to make of this :/
I'll try on my other computer soon, but I don't get why it's working so randomly...

After searching around on StackOverflow for a bit, it seems that corrupted double-linked list errors can be found with valgrind, since they are caused by out-of-bounds memory writes.
So, I decided to run pilight-unittest through valgrind. valgrind is reporting a lot of stuff:

Code:
martin@linux-027e:~/builds/pilight/rewrite> valgrind --leak-check=full ./pilight-unittest
==13757== Memcheck, a memory error detector
==13757== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==13757== Using Valgrind-3.10.0 and LibVEX; rerun with -h for copyright info
==13757== Command: ./pilight-unittest
==13757==
[ test_explode                                     ]
[ test_nrcpu                                       ]
[ test_isrunning                                   ]
[ test_isnummeric                                  ]
[ test_name2uid                                    ]
[ test_strstr                                      ]
[ test_ishex                                       ]
[ test_urldecode                                   ]
[ test_urlencode                                   ]
[ test_base64decode                                ]
[ test_base64encode                                ]
[ test_hostname                                    ]
[ test_distroname                                  ]
[ test_file_exists                                 ]
[ test_path_exists                                 ]
[ test_vercmp                                      ]
[ test_uniq_space                                  ]
[ test_str_replace                                 ]
[ test_stricmp                                     ]
[ test_file_get_contents                           ]
[ test_inet_devs                                   ]
[ test_dev2mac                                     ]
[ test_host2ip                                     ]
[ test_whitelist_check                             ]
[ test_binary                                      ]
[ test_coord2tz                                    ]
[ test_datetime2ts                                 ]
[ test_localtime_l                                 ]
[ test_datefix                                     ]
[ test_json_encode                                 ]
[ test_json_decode                                 ]
[ test_sha256cache                                 ]
[ test_strptime                                    ]
[ test_options_valid                               ]
[ test_options_invalid                             ]
[ test_options_merge                               ]
[ test_dso                                         ]
[ test_eventpool_callback_nothreads                ]
[ test_eventpool_callback_threaded                 ]
[ test_log                                         ]
(/home/martin/builds/pilight/rewrite/tests/log.c #42) [Jan 06 14:57:56:121240] emergency
(/home/martin/builds/pilight/rewrite/tests/log.c #43) [Jan 06 14:57:56:131249] alert
(/home/martin/builds/pilight/rewrite/tests/log.c #44) [Jan 06 14:57:56:135695] critical
(/home/martin/builds/pilight/rewrite/tests/log.c #45) [Jan 06 14:57:56:136048] ERROR: test
==13757== Thread 6:
==13757== Invalid write of size 1
==13757==    at 0x6777A4C: vsnprintf (in /lib64/libc-2.19.so)
==13757==    by 0x6756671: snprintf (in /lib64/libc-2.19.so)
==13757==    by 0x5162D11: _logprintf (log.c:166)
==13757==    by 0x4127CB: test (log.c:46)
==13757==    by 0x51413A7: uv__thread_start (thread.c:52)
==13757==    by 0x4E3D0A3: start_thread (in /lib64/libpthread-2.19.so)
==13757==    by 0x67ED6EC: clone (in /lib64/libc-2.19.so)
==13757==  Address 0x76b9618 is 0 bytes after a block of size 88 alloc'd
==13757==    at 0x4C29110: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==13757==    by 0x5165F6F: _malloc (mem.c:113)
==13757==    by 0x5166115: _realloc (mem.c:161)
==13757==    by 0x5162C13: _logprintf (log.c:156)
==13757==    by 0x4127CB: test (log.c:46)
==13757==    by 0x51413A7: uv__thread_start (thread.c:52)
==13757==    by 0x4E3D0A3: start_thread (in /lib64/libpthread-2.19.so)
==13757==    by 0x67ED6EC: clone (in /lib64/libc-2.19.so)
==13757==
(/home/martin/builds/pilight/rewrite/tests/log.c #46) [Jan 06 14:57:56:136341] WARNING: test
(/home/martin/builds/pilight/rewrite/tests/log.c #47) [Jan 06 14:57:56:138354] NOTICE: test
(/home/martin/builds/pilight/rewrite/tests/log.c #48) [Jan 06 14:57:56:141061] INFO: test
(/home/martin/builds/pilight/rewrite/tests/log.c #49) [Jan 06 14:57:56:141399] DEBUG: test
DEBUG: garbage collected log library
[ test_ssdp_client                                 ]
[ test_ssdp_server                                 ]
[ test_ntp                                         ]
[ test_ping_localhost                              ]
[ test_ping_timeout                                ]
[ test_ping_response                               ]
[ test_http                                        ]
[ test_mail                                        ]
==13757== Thread 1:
==13757== Conditional jump or move depends on uninitialised value(s)
==13757==    at 0x51335FB: uv__io_poll (linux-core.c:281)
==13757==    by 0x512B8E9: uv_run (core.c:354)
==13757==    by 0x413C54: test_mail (mail.c:524)
==13757==    by 0x514A949: CuTestRun (CuTest.c:143)
==13757==    by 0x514AFD5: CuSuiteRun (CuTest.c:298)
==13757==    by 0x406659: RunAllTests (alltests.c:196)
==13757==    by 0x406770: main (alltests.c:219)
==13757==
==13757== Use of uninitialised value of size 8
==13757==    at 0x5133AE9: uv__io_poll (linux-core.c:421)
==13757==    by 0x40DDBC: suite_eventpool (eventpool.c:206)
==13757==    by 0x5B9345F: ???
==13757==    by 0xC0: ???
==13757==    by 0xFFFFFFFF00000000: ???
==13757==    by 0x11: ???
==13757==    by 0x413C54: test_mail (mail.c:524)
==13757==    by 0x514A949: CuTestRun (CuTest.c:143)
==13757==    by 0x514AFD5: CuSuiteRun (CuTest.c:298)
==13757==    by 0x406659: RunAllTests (alltests.c:196)
==13757==    by 0x406770: main (alltests.c:219)
==13757==
==13757== Use of uninitialised value of size 8
==13757==    at 0x5137671: uv__run_check (loop-watcher.c:67)
==13757==    by 0x512B8F6: uv_run (core.c:355)
==13757==    by 0x413C54: test_mail (mail.c:524)
==13757==    by 0x514A949: CuTestRun (CuTest.c:143)
==13757==    by 0x514AFD5: CuSuiteRun (CuTest.c:298)
==13757==    by 0x406659: RunAllTests (alltests.c:196)
==13757==    by 0x406770: main (alltests.c:219)
==13757==
==13757== Conditional jump or move depends on uninitialised value(s)
==13757==    at 0x5137677: uv__run_check (loop-watcher.c:67)
==13757==    by 0x512B8F6: uv_run (core.c:355)
==13757==    by 0x413C54: test_mail (mail.c:524)
==13757==    by 0x514A949: CuTestRun (CuTest.c:143)
==13757==    by 0x514AFD5: CuSuiteRun (CuTest.c:298)
==13757==    by 0x406659: RunAllTests (alltests.c:196)
==13757==    by 0x406770: main (alltests.c:219)
==13757==
==13757== Use of uninitialised value of size 8
==13757==    at 0x512B692: uv__run_closing_handles (core.c:281)
==13757==    by 0x512B903: uv_run (core.c:356)
==13757==    by 0x413C54: test_mail (mail.c:524)
==13757==    by 0x514A949: CuTestRun (CuTest.c:143)
==13757==    by 0x514AFD5: CuSuiteRun (CuTest.c:298)
==13757==    by 0x406659: RunAllTests (alltests.c:196)
==13757==    by 0x406770: main (alltests.c:219)
==13757==
==13757== Use of uninitialised value of size 8
==13757==    at 0x512B6A3: uv__run_closing_handles (core.c:282)
==13757==    by 0x512B903: uv_run (core.c:356)
==13757==    by 0x413C54: test_mail (mail.c:524)
==13757==    by 0x514A949: CuTestRun (CuTest.c:143)
==13757==    by 0x514AFD5: CuSuiteRun (CuTest.c:298)
==13757==    by 0x406659: RunAllTests (alltests.c:196)
==13757==    by 0x406770: main (alltests.c:219)
==13757==
==13757== Conditional jump or move depends on uninitialised value(s)
==13757==    at 0x512B909: uv_run (core.c:358)
==13757==    by 0x413C54: test_mail (mail.c:524)
==13757==    by 0x514A949: CuTestRun (CuTest.c:143)
==13757==    by 0x514AFD5: CuSuiteRun (CuTest.c:298)
==13757==    by 0x406659: RunAllTests (alltests.c:196)
==13757==    by 0x406770: main (alltests.c:219)
==13757==
==13757== Use of uninitialised value of size 8
==13757==    at 0x512B7D0: uv__loop_alive (core.c:323)
==13757==    by 0x512B931: uv_run (core.c:371)
==13757==    by 0x413C54: test_mail (mail.c:524)
==13757==    by 0x514A949: CuTestRun (CuTest.c:143)
==13757==    by 0x514AFD5: CuSuiteRun (CuTest.c:298)
==13757==    by 0x406659: RunAllTests (alltests.c:196)
==13757==    by 0x406770: main (alltests.c:219)
==13757==
==13757== Use of uninitialised value of size 8
==13757==    at 0x512B7E9: uv__loop_alive (core.c:324)
==13757==    by 0x512B931: uv_run (core.c:371)
==13757==    by 0x413C54: test_mail (mail.c:524)
==13757==    by 0x514A949: CuTestRun (CuTest.c:143)
==13757==    by 0x514AFD5: CuSuiteRun (CuTest.c:298)
==13757==    by 0x406659: RunAllTests (alltests.c:196)
==13757==    by 0x406770: main (alltests.c:219)
==13757==
==13757== Conditional jump or move depends on uninitialised value(s)
==13757==    at 0x512B7EF: uv__loop_alive (core.c:323)
==13757==    by 0x512B931: uv_run (core.c:371)
==13757==    by 0x413C54: test_mail (mail.c:524)
==13757==    by 0x514A949: CuTestRun (CuTest.c:143)
==13757==    by 0x514AFD5: CuSuiteRun (CuTest.c:298)
==13757==    by 0x406659: RunAllTests (alltests.c:196)
==13757==    by 0x406770: main (alltests.c:219)
==13757==
==13757== Use of uninitialised value of size 8
==13757==    at 0x512B7F6: uv__loop_alive (core.c:325)
==13757==    by 0x512B931: uv_run (core.c:371)
==13757==    by 0x413C54: test_mail (mail.c:524)
==13757==    by 0x514A949: CuTestRun (CuTest.c:143)
==13757==    by 0x514AFD5: CuSuiteRun (CuTest.c:298)
==13757==    by 0x406659: RunAllTests (alltests.c:196)
==13757==    by 0x406770: main (alltests.c:219)
==13757==
==13757== Conditional jump or move depends on uninitialised value(s)
==13757==    at 0x512B93B: uv_run (core.c:372)
==13757==    by 0x413C54: test_mail (mail.c:524)
==13757==    by 0x514A949: CuTestRun (CuTest.c:143)
==13757==    by 0x514AFD5: CuSuiteRun (CuTest.c:298)
==13757==    by 0x406659: RunAllTests (alltests.c:196)
==13757==    by 0x406770: main (alltests.c:219)
==13757==
==13757== Conditional jump or move depends on uninitialised value(s)
==13757==    at 0x512B942: uv_run (core.c:372)
==13757==    by 0x413C54: test_mail (mail.c:524)
==13757==    by 0x514A949: CuTestRun (CuTest.c:143)
==13757==    by 0x514AFD5: CuSuiteRun (CuTest.c:298)
==13757==    by 0x406659: RunAllTests (alltests.c:196)
==13757==    by 0x406770: main (alltests.c:219)
==13757==
==13757== Use of uninitialised value of size 8
==13757==    at 0x512B960: uv_run (core.c:379)
==13757==    by 0x413C54: test_mail (mail.c:524)
==13757==    by 0x514A949: CuTestRun (CuTest.c:143)
==13757==    by 0x514AFD5: CuSuiteRun (CuTest.c:298)
==13757==    by 0x406659: RunAllTests (alltests.c:196)
==13757==    by 0x406770: main (alltests.c:219)
==13757==
==13757== Thread 6:
==13757== Invalid read of size 8
==13757==    at 0x67E13ED: ??? (in /lib64/libc-2.19.so)
==13757==    by 0x6779A52: _IO_file_write@@GLIBC_2.2.5 (in /lib64/libc-2.19.so)
==13757==    by 0x6779112: new_do_write (in /lib64/libc-2.19.so)
==13757==    by 0x677A884: _IO_do_write@@GLIBC_2.2.5 (in /lib64/libc-2.19.so)
==13757==    by 0x6779F80: _IO_file_xsputn@@GLIBC_2.2.5 (in /lib64/libc-2.19.so)
==13757==    by 0x674C9F9: vfprintf (in /lib64/libc-2.19.so)
==13757==    by 0x67565D8: printf (in /lib64/libc-2.19.so)
==13757==    by 0x413C63: test_mail (mail.c:525)
==13757==    by 0x514A949: CuTestRun (CuTest.c:143)
==13757==    by 0x514AFD5: CuSuiteRun (CuTest.c:298)
==13757==    by 0x406659: RunAllTests (alltests.c:196)
==13757==    by 0x406770: main (alltests.c:219)
==13757==  Address 0xffefff220 is on thread 1's stack
==13757==  1688 bytes below stack pointer
==13757==
==13757== Invalid write of size 8
==13757==    at 0x67E13F4: ??? (in /lib64/libc-2.19.so)
==13757==  Address 0xffefff218 is on thread 1's stack
==13757==  1696 bytes below stack pointer
==13757==
==13757== Invalid read of size 8
==13757==    at 0x67F9D1F: __libc_disable_asynccancel (in /lib64/libc-2.19.so)
==13757==    by 0x67E13F8: ??? (in /lib64/libc-2.19.so)
==13757==    by 0x6779A52: _IO_file_write@@GLIBC_2.2.5 (in /lib64/libc-2.19.so)
==13757==    by 0x6779112: new_do_write (in /lib64/libc-2.19.so)
==13757==    by 0x677A884: _IO_do_write@@GLIBC_2.2.5 (in /lib64/libc-2.19.so)
==13757==    by 0x6779F80: _IO_file_xsputn@@GLIBC_2.2.5 (in /lib64/libc-2.19.so)
==13757==    by 0x674C9F9: vfprintf (in /lib64/libc-2.19.so)
==13757==    by 0x67565D8: printf (in /lib64/libc-2.19.so)
==13757==    by 0x413C63: test_mail (mail.c:525)
==13757==    by 0x514A949: CuTestRun (CuTest.c:143)
==13757==    by 0x514AFD5: CuSuiteRun (CuTest.c:298)
==13757==    by 0x406659: RunAllTests (alltests.c:196)
==13757==  Address 0xffefff218 is on thread 1's stack
==13757==  1696 bytes below stack pointer
==13757==
==13757== Invalid read of size 8
==13757==    at 0x67E1408: ??? (in /lib64/libc-2.19.so)
==13757==    by 0x6779A52: _IO_file_write@@GLIBC_2.2.5 (in /lib64/libc-2.19.so)
==13757==    by 0x6779112: new_do_write (in /lib64/libc-2.19.so)
==13757==    by 0x677A884: _IO_do_write@@GLIBC_2.2.5 (in /lib64/libc-2.19.so)
==13757==    by 0x6779F80: _IO_file_xsputn@@GLIBC_2.2.5 (in /lib64/libc-2.19.so)
==13757==    by 0x674C9F9: vfprintf (in /lib64/libc-2.19.so)
==13757==    by 0x67565D8: printf (in /lib64/libc-2.19.so)
==13757==    by 0x413C63: test_mail (mail.c:525)
==13757==    by 0x514A949: CuTestRun (CuTest.c:143)
==13757==    by 0x514AFD5: CuSuiteRun (CuTest.c:298)
==13757==    by 0x406659: RunAllTests (alltests.c:196)
==13757==    by 0x406770: main (alltests.c:219)
==13757==  Address 0xffefff228 is on thread 1's stack
==13757==  1680 bytes below stack pointer
==13757==
==13757== Invalid read of size 8
==13757==    at 0x6779A7F: _IO_file_write@@GLIBC_2.2.5 (in /lib64/libc-2.19.so)
==13757==    by 0x6779112: new_do_write (in /lib64/libc-2.19.so)
==13757==    by 0x677A884: _IO_do_write@@GLIBC_2.2.5 (in /lib64/libc-2.19.so)
==13757==    by 0x6779F80: _IO_file_xsputn@@GLIBC_2.2.5 (in /lib64/libc-2.19.so)
==13757==    by 0x674C9F9: vfprintf (in /lib64/libc-2.19.so)
==13757==    by 0x67565D8: printf (in /lib64/libc-2.19.so)
==13757==    by 0x413C63: test_mail (mail.c:525)
==13757==    by 0x514A949: CuTestRun (CuTest.c:143)
==13757==    by 0x514AFD5: CuSuiteRun (CuTest.c:298)
==13757==    by 0x406659: RunAllTests (alltests.c:196)
==13757==    by 0x406770: main (alltests.c:219)
==13757==  Address 0xffefff238 is on thread 1's stack
==13757==  1664 bytes below stack pointer
==13757==
==13757== Invalid read of size 8
==13757==    at 0x6779A80: _IO_file_write@@GLIBC_2.2.5 (in /lib64/libc-2.19.so)
==13757==    by 0x6779112: new_do_write (in /lib64/libc-2.19.so)
==13757==    by 0x677A884: _IO_do_write@@GLIBC_2.2.5 (in /lib64/libc-2.19.so)
==13757==    by 0x6779F80: _IO_file_xsputn@@GLIBC_2.2.5 (in /lib64/libc-2.19.so)
==13757==    by 0x674C9F9: vfprintf (in /lib64/libc-2.19.so)
==13757==    by 0x67565D8: printf (in /lib64/libc-2.19.so)
==13757==    by 0x413C63: test_mail (mail.c:525)
==13757==    by 0x514A949: CuTestRun (CuTest.c:143)
==13757==    by 0x514AFD5: CuSuiteRun (CuTest.c:298)
==13757==    by 0x406659: RunAllTests (alltests.c:196)
==13757==    by 0x406770: main (alltests.c:219)
==13757==  Address 0xffefff240 is on thread 1's stack
==13757==  1656 bytes below stack pointer
==13757==
==13757== Invalid read of size 8
==13757==    at 0x6779A81: _IO_file_write@@GLIBC_2.2.5 (in /lib64/libc-2.19.so)
==13757==    by 0x4020FFF: ???
==13757==  Address 0xffefff248 is on thread 1's stack
==13757==  1648 bytes below stack pointer
==13757==
==13757== Invalid read of size 8
==13757==    at 0x6779A83: _IO_file_write@@GLIBC_2.2.5 (in /lib64/libc-2.19.so)
==13757==  Address 0xffefff250 is on thread 1's stack
==13757==  1640 bytes below stack pointer
==13757==
==13757== Invalid read of size 8
==13757==    at 0x6779A85: _IO_file_write@@GLIBC_2.2.5 (in /lib64/libc-2.19.so)
==13757==    by 0x6779112: new_do_write (in /lib64/libc-2.19.so)
==13757==    by 0x677A884: _IO_do_write@@GLIBC_2.2.5 (in /lib64/libc-2.19.so)
==13757==    by 0x6779F80: _IO_file_xsputn@@GLIBC_2.2.5 (in /lib64/libc-2.19.so)
==13757==    by 0x674C9F9: vfprintf (in /lib64/libc-2.19.so)
==13757==    by 0x67565D8: printf (in /lib64/libc-2.19.so)
==13757==    by 0x413C63: test_mail (mail.c:525)
==13757==    by 0x514A949: CuTestRun (CuTest.c:143)
==13757==    by 0x514AFD5: CuSuiteRun (CuTest.c:298)
==13757==    by 0x406659: RunAllTests (alltests.c:196)
==13757==    by 0x406770: main (alltests.c:219)
==13757==  Address 0xffefff258 is on thread 1's stack
==13757==  1632 bytes below stack pointer
==13757==
==13757== Invalid read of size 8
==13757==    at 0x677914F: new_do_write (in /lib64/libc-2.19.so)
==13757==    by 0x677A884: _IO_do_write@@GLIBC_2.2.5 (in /lib64/libc-2.19.so)
==13757==    by 0x6779F80: _IO_file_xsputn@@GLIBC_2.2.5 (in /lib64/libc-2.19.so)
==13757==    by 0x674C9F9: vfprintf (in /lib64/libc-2.19.so)
==13757==    by 0x67565D8: printf (in /lib64/libc-2.19.so)
==13757==    by 0x413C63: test_mail (mail.c:525)
==13757==    by 0x514A949: CuTestRun (CuTest.c:143)
==13757==    by 0x514AFD5: CuSuiteRun (CuTest.c:298)
==13757==    by 0x406659: RunAllTests (alltests.c:196)
==13757==    by 0x406770: main (alltests.c:219)
==13757==  Address 0xffefff260 is on thread 1's stack
==13757==  1624 bytes below stack pointer
==13757==
==13757== Invalid read of size 8
==13757==    at 0x6779150: new_do_write (in /lib64/libc-2.19.so)
==13757==    by 0x677A884: _IO_do_write@@GLIBC_2.2.5 (in /lib64/libc-2.19.so)
==13757==    by 0x6779F80: _IO_file_xsputn@@GLIBC_2.2.5 (in /lib64/libc-2.19.so)
==13757==    by 0x674C9F9: vfprintf (in /lib64/libc-2.19.so)
==13757==    by 0x67565D8: printf (in /lib64/libc-2.19.so)
==13757==    by 0x413C63: test_mail (mail.c:525)
==13757==    by 0x514A949: CuTestRun (CuTest.c:143)
==13757==    by 0x514AFD5: CuSuiteRun (CuTest.c:298)
==13757==    by 0x406659: RunAllTests (alltests.c:196)
==13757==    by 0x406770: main (alltests.c:219)
==13757==  Address 0xffefff268 is on thread 1's stack
==13757==  1616 bytes below stack pointer
==13757==
==13757== Invalid read of size 8
==13757==    at 0x6779151: new_do_write (in /lib64/libc-2.19.so)
==13757==    by 0x41C0AA: ??? (in /home/martin/builds/pilight/rewrite/pilight-unittest)
==13757==    by 0x677A884: _IO_do_write@@GLIBC_2.2.5 (in /lib64/libc-2.19.so)
==13757==    by 0x6779F80: _IO_file_xsputn@@GLIBC_2.2.5 (in /lib64/libc-2.19.so)
==13757==    by 0x674C9F9: vfprintf (in /lib64/libc-2.19.so)
==13757==    by 0x67565D8: printf (in /lib64/libc-2.19.so)
==13757==    by 0x413C63: test_mail (mail.c:525)
==13757==    by 0x514A949: CuTestRun (CuTest.c:143)
==13757==    by 0x514AFD5: CuSuiteRun (CuTest.c:298)
==13757==    by 0x406659: RunAllTests (alltests.c:196)
==13757==    by 0x406770: main (alltests.c:219)
==13757==  Address 0xffefff270 is on thread 1's stack
==13757==  1608 bytes below stack pointer
==13757==
==13757== Invalid read of size 8
==13757==    at 0x6779153: new_do_write (in /lib64/libc-2.19.so)
==13757==    by 0x677A884: _IO_do_write@@GLIBC_2.2.5 (in /lib64/libc-2.19.so)
==13757==    by 0x6779F80: _IO_file_xsputn@@GLIBC_2.2.5 (in /lib64/libc-2.19.so)
==13757==    by 0x674C9F9: vfprintf (in /lib64/libc-2.19.so)
==13757==    by 0x67565D8: printf (in /lib64/libc-2.19.so)
==13757==    by 0x413C63: test_mail (mail.c:525)
==13757==    by 0x514A949: CuTestRun (CuTest.c:143)
==13757==    by 0x514AFD5: CuSuiteRun (CuTest.c:298)
==13757==    by 0x406659: RunAllTests (alltests.c:196)
==13757==    by 0x406770: main (alltests.c:219)
==13757==  Address 0xffefff278 is on thread 1's stack
==13757==  1600 bytes below stack pointer
==13757==
==13757== Invalid read of size 8
==13757==    at 0x677A890: _IO_do_write@@GLIBC_2.2.5 (in /lib64/libc-2.19.so)
==13757==    by 0x6779F80: _IO_file_xsputn@@GLIBC_2.2.5 (in /lib64/libc-2.19.so)
==13757==    by 0x674C9F9: vfprintf (in /lib64/libc-2.19.so)
==13757==    by 0x67565D8: printf (in /lib64/libc-2.19.so)
==13757==    by 0x413C63: test_mail (mail.c:525)
==13757==    by 0x514A949: CuTestRun (CuTest.c:143)
==13757==    by 0x514AFD5: CuSuiteRun (CuTest.c:298)
==13757==    by 0x406659: RunAllTests (alltests.c:196)
==13757==    by 0x406770: main (alltests.c:219)
==13757==  Address 0xffefff280 is on thread 1's stack
==13757==  1592 bytes below stack pointer
==13757==
==13757== Invalid read of size 8
==13757==    at 0x677A891: _IO_do_write@@GLIBC_2.2.5 (in /lib64/libc-2.19.so)
==13757==    by 0x6779F80: _IO_file_xsputn@@GLIBC_2.2.5 (in /lib64/libc-2.19.so)
==13757==    by 0x674C9F9: vfprintf (in /lib64/libc-2.19.so)
==13757==    by 0x67565D8: printf (in /lib64/libc-2.19.so)
==13757==    by 0x413C63: test_mail (mail.c:525)
==13757==    by 0x514A949: CuTestRun (CuTest.c:143)
==13757==    by 0x514AFD5: CuSuiteRun (CuTest.c:298)
==13757==    by 0x406659: RunAllTests (alltests.c:196)
==13757==    by 0x406770: main (alltests.c:219)
==13757==  Address 0xffefff288 is on thread 1's stack
==13757==  1584 bytes below stack pointer
==13757==
==13757== Invalid read of size 8
==13757==    at 0x6779F56: _IO_file_xsputn@@GLIBC_2.2.5 (in /lib64/libc-2.19.so)
==13757==    by 0x674C9F9: vfprintf (in /lib64/libc-2.19.so)
==13757==    by 0x67565D8: printf (in /lib64/libc-2.19.so)
==13757==    by 0x413C63: test_mail (mail.c:525)
==13757==    by 0x514A949: CuTestRun (CuTest.c:143)
==13757==    by 0x514AFD5: CuSuiteRun (CuTest.c:298)
==13757==    by 0x406659: RunAllTests (alltests.c:196)
==13757==    by 0x406770: main (alltests.c:219)
==13757==  Address 0xffefff290 is on thread 1's stack
==13757==  1576 bytes below stack pointer
==13757==
==13757== Invalid read of size 8
==13757==    at 0x6779F57: _IO_file_xsputn@@GLIBC_2.2.5 (in /lib64/libc-2.19.so)
==13757==    by 0x674C9F9: vfprintf (in /lib64/libc-2.19.so)
==13757==    by 0x67565D8: printf (in /lib64/libc-2.19.so)
==13757==    by 0x413C63: test_mail (mail.c:525)
==13757==    by 0x514A949: CuTestRun (CuTest.c:143)
==13757==    by 0x514AFD5: CuSuiteRun (CuTest.c:298)
==13757==    by 0x406659: RunAllTests (alltests.c:196)
==13757==    by 0x406770: main (alltests.c:219)
==13757==  Address 0xffefff298 is on thread 1's stack
==13757==  1568 bytes below stack pointer
==13757==
==13757== Invalid read of size 8
==13757==    at 0x6779F58: _IO_file_xsputn@@GLIBC_2.2.5 (in /lib64/libc-2.19.so)
==13757==    by 0x67565D8: printf (in /lib64/libc-2.19.so)
==13757==    by 0x413C63: test_mail (mail.c:525)
==13757==    by 0x514A949: CuTestRun (CuTest.c:143)
==13757==    by 0x514AFD5: CuSuiteRun (CuTest.c:298)
==13757==    by 0x406659: RunAllTests (alltests.c:196)
==13757==    by 0x406770: main (alltests.c:219)
==13757==  Address 0xffefff2a0 is on thread 1's stack
==13757==  1560 bytes below stack pointer
==13757==
==13757== Invalid read of size 8
==13757==    at 0x6779F5A: _IO_file_xsputn@@GLIBC_2.2.5 (in /lib64/libc-2.19.so)
==13757==    by 0x67565D8: printf (in /lib64/libc-2.19.so)
==13757==    by 0x413C63: test_mail (mail.c:525)
==13757==    by 0x514A949: CuTestRun (CuTest.c:143)
==13757==    by 0x514AFD5: CuSuiteRun (CuTest.c:298)
==13757==    by 0x406659: RunAllTests (alltests.c:196)
==13757==    by 0x406770: main (alltests.c:219)
==13757==  Address 0xffefff2a8 is on thread 1's stack
==13757==  1552 bytes below stack pointer
==13757==
==13757== Invalid read of size 8
==13757==    at 0x6779F5C: _IO_file_xsputn@@GLIBC_2.2.5 (in /lib64/libc-2.19.so)
==13757==    by 0x67565D8: printf (in /lib64/libc-2.19.so)
==13757==    by 0x413C63: test_mail (mail.c:525)
==13757==    by 0x514A949: CuTestRun (CuTest.c:143)
==13757==    by 0x514AFD5: CuSuiteRun (CuTest.c:298)
==13757==    by 0x406659: RunAllTests (alltests.c:196)
==13757==    by 0x406770: main (alltests.c:219)
==13757==  Address 0xffefff2b0 is on thread 1's stack
==13757==  1544 bytes below stack pointer
==13757==
==13757== Invalid read of size 8
==13757==    at 0x6779F5E: _IO_file_xsputn@@GLIBC_2.2.5 (in /lib64/libc-2.19.so)
==13757==    by 0x67565D8: printf (in /lib64/libc-2.19.so)
==13757==    by 0x413C63: test_mail (mail.c:525)
==13757==    by 0x514A949: CuTestRun (CuTest.c:143)
==13757==    by 0x514AFD5: CuSuiteRun (CuTest.c:298)
==13757==    by 0x406659: RunAllTests (alltests.c:196)
==13757==    by 0x406770: main (alltests.c:219)
==13757==  Address 0xffefff2b8 is on thread 1's stack
==13757==  1536 bytes below stack pointer
==13757==
==13757== Invalid read of size 8
==13757==    at 0x674C9FA: vfprintf (in /lib64/libc-2.19.so)
==13757==    by 0x67565D8: printf (in /lib64/libc-2.19.so)
==13757==    by 0x413C63: test_mail (mail.c:525)
==13757==    by 0x514A949: CuTestRun (CuTest.c:143)
==13757==    by 0x514AFD5: CuSuiteRun (CuTest.c:298)
==13757==    by 0x406659: RunAllTests (alltests.c:196)
==13757==    by 0x406770: main (alltests.c:219)
==13757==  Address 0xffefff3d0 is on thread 1's stack
==13757==  1256 bytes below stack pointer
==13757==
==13757== Invalid write of size 8
==13757==    at 0x674CA01: vfprintf (in /lib64/libc-2.19.so)
==13757==    by 0x67565D8: printf (in /lib64/libc-2.19.so)
==13757==    by 0x413C63: test_mail (mail.c:525)
==13757==    by 0x514A949: CuTestRun (CuTest.c:143)
==13757==    by 0x514AFD5: CuSuiteRun (CuTest.c:298)
==13757==    by 0x406659: RunAllTests (alltests.c:196)
==13757==    by 0x406770: main (alltests.c:219)
==13757==  Address 0xffefff3b0 is on thread 1's stack
==13757==  1288 bytes below stack pointer
==13757==
==13757== Invalid read of size 4
==13757==    at 0x674CA0C: vfprintf (in /lib64/libc-2.19.so)
==13757==    by 0x67565D8: printf (in /lib64/libc-2.19.so)
==13757==    by 0x413C63: test_mail (mail.c:525)
==13757==    by 0x514A949: CuTestRun (CuTest.c:143)
==13757==    by 0x514AFD5: CuSuiteRun (CuTest.c:298)
==13757==    by 0x406659: RunAllTests (alltests.c:196)
==13757==    by 0x406770: main (alltests.c:219)
==13757==  Address 0xffefff3c8 is on thread 1's stack
==13757==  1264 bytes below stack pointer
==13757==
==13757== Invalid write of size 4
==13757==    at 0x674CA39: vfprintf (in /lib64/libc-2.19.so)
==13757==    by 0x67565D8: printf (in /lib64/libc-2.19.so)
==13757==    by 0x413C63: test_mail (mail.c:525)
==13757==    by 0x514A949: CuTestRun (CuTest.c:143)
==13757==    by 0x514AFD5: CuSuiteRun (CuTest.c:298)
==13757==    by 0x406659: RunAllTests (alltests.c:196)
==13757==    by 0x406770: main (alltests.c:219)
==13757==  Address 0xffefff3c8 is on thread 1's stack
==13757==  1264 bytes below stack pointer
==13757==
==13757== Invalid read of size 8
==13757==    at 0x674C795: vfprintf (in /lib64/libc-2.19.so)
==13757==    by 0x67565D8: printf (in /lib64/libc-2.19.so)
==13757==    by 0x413C63: test_mail (mail.c:525)
==13757==    by 0x514A949: CuTestRun (CuTest.c:143)
==13757==    by 0x514AFD5: CuSuiteRun (CuTest.c:298)
==13757==    by 0x406659: RunAllTests (alltests.c:196)
==13757==    by 0x406770: main (alltests.c:219)
==13757==  Address 0xffefff380 is on thread 1's stack
==13757==  1336 bytes below stack pointer
==13757==
==13757== Invalid read of size 8
==13757==    at 0x674C79F: vfprintf (in /lib64/libc-2.19.so)
==13757==    by 0x67565D8: printf (in /lib64/libc-2.19.so)
==13757==    by 0x413C63: test_mail (mail.c:525)
==13757==    by 0x514A949: CuTestRun (CuTest.c:143)
==13757==    by 0x514AFD5: CuSuiteRun (CuTest.c:298)
==13757==    by 0x406659: RunAllTests (alltests.c:196)
==13757==    by 0x406770: main (alltests.c:219)
==13757==  Address 0xffefff3b0 is on thread 1's stack
==13757==  1288 bytes below stack pointer
==13757==
==13757== Invalid read of size 8
==13757==    at 0x67F9C89: __lll_unlock_wake_private (in /lib64/libc-2.19.so)
==13757==    by 0x63E1E7: ???
==13757==  Address 0xffefff228 is on thread 1's stack
==13757==  1472 bytes below stack pointer
==13757==
==13757== Invalid read of size 8
==13757==    at 0x67F9C8A: __lll_unlock_wake_private (in /lib64/libc-2.19.so)
==13757==    by 0x63E1E7: ???
==13757==  Address 0xffefff230 is on thread 1's stack
==13757==  1464 bytes below stack pointer
==13757==
==13757== Invalid read of size 8
==13757==    at 0x67F9C8B: __lll_unlock_wake_private (in /lib64/libc-2.19.so)
==13757==    by 0x63E1E7: ???
==13757==  Address 0xffefff238 is on thread 1's stack
==13757==  1456 bytes below stack pointer
==13757==
==13757==
==13757== Process terminating with default action of signal 11 (SIGSEGV)
==13757==  Bad permissions for mapped region at address 0x63E1E8
==13757==    at 0x63E1E8: ???
==13757== Thread 4:
==13757== Invalid free() / delete / delete[] / realloc()
==13757==    at 0x4C2A37C: free (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==13757==    by 0x68511CB: __libc_freeres (in /lib64/libc-2.19.so)
==13757==    by 0x4A2370C: _vgnU_freeres (in /usr/lib64/valgrind/vgpreload_core-amd64-linux.so)
==13757==  Address 0x6aaa2d0 is 0 bytes inside data symbol "noai6ai_cached"
==13757==
==13757==
==13757== HEAP SUMMARY:
==13757==     in use at exit: 1,297,847 bytes in 178 blocks
==13757==   total heap usage: 5,602 allocs, 5,425 frees, 3,637,711 bytes allocated
==13757==
==13757== Thread 1:
==13757== 24 bytes in 1 blocks are definitely lost in loss record 57 of 175
==13757==    at 0x4C2B200: calloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==13757==    by 0x50FE547: ssl_append_key_cert (ssl_tls.c:5698)
==13757==    by 0x50FE619: mbedtls_ssl_conf_own_cert (ssl_tls.c:5726)
==13757==    by 0x516F3B1: ssl_init (ssl.c:104)
==13757==    by 0x40ECFA: test_http (http.c:453)
==13757==    by 0x514A949: CuTestRun (CuTest.c:143)
==13757==    by 0x514AFD5: CuSuiteRun (CuTest.c:298)
==13757==    by 0x406659: RunAllTests (alltests.c:196)
==13757==    by 0x406770: main (alltests.c:219)
==13757==
==13757== 256 bytes in 1 blocks are definitely lost in loss record 131 of 175
==13757==    at 0x4C2B200: calloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==13757==    by 0x50A1BD4: mbedtls_mpi_grow (bignum.c:123)
==13757==    by 0x50A27AF: mbedtls_mpi_read_string (bignum.c:445)
==13757==    by 0x50FEA44: mbedtls_ssl_conf_dh_param (ssl_tls.c:5869)
==13757==    by 0x5100D97: mbedtls_ssl_config_defaults (ssl_tls.c:7206)
==13757==    by 0x516EFFD: ssl_init (ssl.c:55)
==13757==    by 0x40ECFA: test_http (http.c:453)
==13757==    by 0x514A949: CuTestRun (CuTest.c:143)
==13757==    by 0x514AFD5: CuSuiteRun (CuTest.c:298)
==13757==    by 0x406659: RunAllTests (alltests.c:196)
==13757==    by 0x406770: main (alltests.c:219)
==13757==
==13757== 256 bytes in 1 blocks are definitely lost in loss record 132 of 175
==13757==    at 0x4C2B200: calloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==13757==    by 0x50A1BD4: mbedtls_mpi_grow (bignum.c:123)
==13757==    by 0x50A27AF: mbedtls_mpi_read_string (bignum.c:445)
==13757==    by 0x50FEA70: mbedtls_ssl_conf_dh_param (ssl_tls.c:5869)
==13757==    by 0x5100D97: mbedtls_ssl_config_defaults (ssl_tls.c:7206)
==13757==    by 0x516EFFD: ssl_init (ssl.c:55)
==13757==    by 0x40ECFA: test_http (http.c:453)
==13757==    by 0x514A949: CuTestRun (CuTest.c:143)
==13757==    by 0x514AFD5: CuSuiteRun (CuTest.c:298)
==13757==    by 0x406659: RunAllTests (alltests.c:196)
==13757==    by 0x406770: main (alltests.c:219)
==13757==
==13757== 288 bytes in 1 blocks are possibly lost in loss record 142 of 175
==13757==    at 0x4C2B200: calloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==13757==    by 0x4010EC1: allocate_dtv (in /lib64/ld-2.19.so)
==13757==    by 0x40115CD: _dl_allocate_tls (in /lib64/ld-2.19.so)
==13757==    by 0x4E3DC2A: pthread_create@@GLIBC_2.2.5 (in /lib64/libpthread-2.19.so)
==13757==    by 0x5141427: uv_thread_create (thread.c:97)
==13757==    by 0x40DC0D: test_callback (eventpool.c:164)
==13757==    by 0x40DD1D: test_eventpool_callback_nothreads (eventpool.c:190)
==13757==    by 0x514A949: CuTestRun (CuTest.c:143)
==13757==    by 0x514AFD5: CuSuiteRun (CuTest.c:298)
==13757==    by 0x406659: RunAllTests (alltests.c:196)
==13757==    by 0x406770: main (alltests.c:219)
==13757==
==13757== 288 bytes in 1 blocks are possibly lost in loss record 143 of 175
==13757==    at 0x4C2B200: calloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==13757==    by 0x4010EC1: allocate_dtv (in /lib64/ld-2.19.so)
==13757==    by 0x40115CD: _dl_allocate_tls (in /lib64/ld-2.19.so)
==13757==    by 0x4E3DC2A: pthread_create@@GLIBC_2.2.5 (in /lib64/libpthread-2.19.so)
==13757==    by 0x5141427: uv_thread_create (thread.c:97)
==13757==    by 0x413B5F: test (mail.c:513)
==13757==    by 0x413CEB: test_mail (mail.c:539)
==13757==    by 0x514A949: CuTestRun (CuTest.c:143)
==13757==    by 0x514AFD5: CuSuiteRun (CuTest.c:298)
==13757==    by 0x406659: RunAllTests (alltests.c:196)
==13757==    by 0x406770: main (alltests.c:219)
==13757==
==13757== 1,152 bytes in 4 blocks are possibly lost in loss record 148 of 175
==13757==    at 0x4C2B200: calloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==13757==    by 0x4010EC1: allocate_dtv (in /lib64/ld-2.19.so)
==13757==    by 0x40115CD: _dl_allocate_tls (in /lib64/ld-2.19.so)
==13757==    by 0x4E3DC2A: pthread_create@@GLIBC_2.2.5 (in /lib64/libpthread-2.19.so)
==13757==    by 0x5141427: uv_thread_create (thread.c:97)
==13757==    by 0x5127D7C: init_once (threadpool.c:173)
==13757==    by 0x4E423FF: pthread_once (in /lib64/libpthread-2.19.so)
==13757==    by 0x5141712: uv_once (thread.c:242)
==13757==    by 0x5127DCF: uv__work_submit (threadpool.c:184)
==13757==    by 0x51282B7: uv_queue_work (threadpool.c:272)
==13757==    by 0x5154C75: eventpool_execute (eventpool.c:1162)
==13757==    by 0x512ABA8: uv__async_event (async.c:98)
==13757==
==13757== 8,208 bytes in 1 blocks are definitely lost in loss record 168 of 175
==13757==    at 0x4C29110: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==13757==    by 0x514AE67: CuSuiteNew (CuTest.c:256)
==13757==    by 0x419B65: suite_webserver (webserver.c:400)
==13757==    by 0x4065C2: RunAllTests (alltests.c:188)
==13757==    by 0x406770: main (alltests.c:219)
==13757==
==13757== 8,208 bytes in 1 blocks are definitely lost in loss record 169 of 175
==13757==    at 0x4C29110: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==13757==    by 0x514AE67: CuSuiteNew (CuTest.c:256)
==13757==    by 0x417E58: suite_socket (socket.c:149)
==13757==    by 0x4065E3: RunAllTests (alltests.c:189)
==13757==    by 0x406770: main (alltests.c:219)
==13757==
==13757== 8,208 bytes in 1 blocks are definitely lost in loss record 170 of 175
==13757==    at 0x4C29110: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==13757==    by 0x514AE67: CuSuiteNew (CuTest.c:256)
==13757==    by 0x4177C6: suite_protocols (protocols_433.c:128)
==13757==    by 0x406604: RunAllTests (alltests.c:190)
==13757==    by 0x406770: main (alltests.c:219)
==13757==
==13757== LEAK SUMMARY:
==13757==    definitely lost: 25,160 bytes in 6 blocks
==13757==    indirectly lost: 0 bytes in 0 blocks
==13757==      possibly lost: 1,728 bytes in 6 blocks
==13757==    still reachable: 1,270,959 bytes in 166 blocks
==13757==         suppressed: 0 bytes in 0 blocks
==13757== Reachable blocks (those to which a pointer was found) are not shown.
==13757== To see them, rerun with: --leak-check=full --show-leak-kinds=all
==13757==
==13757== For counts of detected and suppressed errors, rerun with: -v
==13757== Use --track-origins=yes to see where uninitialised values come from
==13757== ERROR SUMMARY: 55 errors from 55 contexts (suppressed: 0 from 0)
Killed

In fact, there's an "Invalid write of size 1" message right in the logging tests where I usually get the segfault (didn't get it on this run though).
 
Reply
#14
Can you check in a clean install of OpenSuse?
 
Reply
#15
On my other computer running openSUSE Leap 42.2 (installed last week) I'm getting this:

Code:
martin@linux-s7ea:~/git/pilight/rewrite> ./pilight-unittest  
[ test_explode                                     ]
[ test_nrcpu                                       ]
[ test_isrunning                                   ]
[ test_isnummeric                                  ]
[ test_name2uid                                    ]
[ test_strstr                                      ]
[ test_ishex                                       ]
[ test_urldecode                                   ]
[ test_urlencode                                   ]
[ test_base64decode                                ]
[ test_base64encode                                ]
[ test_hostname                                    ]
[ test_distroname                                  ]
[ test_file_exists                                 ]
[ test_path_exists                                 ]
[ test_vercmp                                      ]
[ test_uniq_space                                  ]
[ test_str_replace                                 ]
[ test_stricmp                                     ]
[ test_file_get_contents                           ]
[ test_inet_devs                                   ]
[ test_dev2mac                                     ]
[ test_host2ip                                     ]
[ test_whitelist_check                             ]
[ test_binary                                      ]
[ test_coord2tz                                    ]
[ test_datetime2ts                                 ]
[ test_localtime_l                                 ]
[ test_datefix                                     ]
[ test_json_encode                                 ]
[ test_json_decode                                 ]
[ test_sha256cache                                 ]
[ test_strptime                                    ]
[ test_options_valid                               ]
[ test_options_invalid                             ]
[ test_options_merge                               ]
[ test_dso                                         ]
[ test_eventpool_callback_nothreads                ]
[ test_eventpool_callback_threaded                 ]
[ test_log                                         ]
(/home/martin/git/pilight/rewrite/tests/log.c #42) [Jan 06 15:21:34:213328] emergency
(/home/martin/git/pilight/rewrite/tests/log.c #43) [Jan 06 15:21:34:213414] alert
(/home/martin/git/pilight/rewrite/tests/log.c #44) [Jan 06 15:21:34:213439] critical
(/home/martin/git/pilight/rewrite/tests/log.c #45) [Jan 06 15:21:34:213470] ERROR: test
*** Error in `./pilight-unittest': corrupted double-linked list: 0x00007fd3a4000f00 ***
======= Backtrace: =========
/lib64/libc.so.6(+0x721af)[0x7fd3b273f1af]
/lib64/libc.so.6(+0x779d6)[0x7fd3b27449d6]
/lib64/libc.so.6(+0x7aac3)[0x7fd3b2747ac3]
/lib64/libc.so.6(realloc+0x12f)[0x7fd3b2748daf]
./libpilight.so(_realloc+0xc6)[0x7fd3b36f6fb7]
./libpilight.so(_logprintf+0x4dd)[0x7fd3b36f3d5d]
./pilight-unittest[0x4127d1]
./libpilight.so(+0xef4e8)[0x7fd3b36c64e8]
/lib64/libpthread.so.0(+0x8734)[0x7fd3b4127734]
/lib64/libc.so.6(clone+0x6d)[0x7fd3b27b6d3d]
======= Memory map: ========
00400000-00420000 r-xp 00000000 08:13 811368660                          /home/martin/git/pilight/rewrite/pilight-unittest
0061f000-00620000 r--p 0001f000 08:13 811368660                          /home/martin/git/pilight/rewrite/pilight-unittest
00620000-0063d000 rw-p 00020000 08:13 811368660                          /home/martin/git/pilight/rewrite/pilight-unittest
0063d000-0063f000 rw-p 00000000 00:00 0
01430000-01472000 rw-p 00000000 00:00 0                                  [heap]
7fd39c000000-7fd39c021000 rw-p 00000000 00:00 0
7fd39c021000-7fd3a0000000 ---p 00000000 00:00 0
7fd3a4000000-7fd3a4021000 rw-p 00000000 00:00 0
7fd3a4021000-7fd3a8000000 ---p 00000000 00:00 0
7fd3aa7fd000-7fd3aa7fe000 ---p 00000000 00:00 0
7fd3aa7fe000-7fd3aaffe000 rw-p 00000000 00:00 0
7fd3aaffe000-7fd3aafff000 ---p 00000000 00:00 0
7fd3aafff000-7fd3ab7ff000 rw-p 00000000 00:00 0
7fd3ab7ff000-7fd3ab800000 ---p 00000000 00:00 0
7fd3ab800000-7fd3ac000000 rw-p 00000000 00:00 0
7fd3ac000000-7fd3ac021000 rw-p 00000000 00:00 0
7fd3ac021000-7fd3b0000000 ---p 00000000 00:00 0
7fd3b015f000-7fd3b0175000 r-xp 00000000 08:01 262228                     /lib64/libgcc_s.so.1
7fd3b0175000-7fd3b0374000 ---p 00016000 08:01 262228                     /lib64/libgcc_s.so.1
7fd3b0374000-7fd3b0375000 r--p 00015000 08:01 262228                     /lib64/libgcc_s.so.1
7fd3b0375000-7fd3b0376000 rw-p 00016000 08:01 262228                     /lib64/libgcc_s.so.1
7fd3b0376000-7fd3b0377000 ---p 00000000 00:00 0
7fd3b0377000-7fd3b0b77000 rw-p 00000000 00:00 0
7fd3b0b77000-7fd3b0b78000 ---p 00000000 00:00 0
7fd3b0b78000-7fd3b1378000 rw-p 00000000 00:00 0
7fd3b1378000-7fd3b13e6000 r-xp 00000000 08:01 1056074                    /usr/lib64/libpcre.so.1.2.7
7fd3b13e6000-7fd3b15e5000 ---p 0006e000 08:01 1056074                    /usr/lib64/libpcre.so.1.2.7
7fd3b15e5000-7fd3b15e6000 r--p 0006d000 08:01 1056074                    /usr/lib64/libpcre.so.1.2.7
7fd3b15e6000-7fd3b15e7000 rw-p 0006e000 08:01 1056074                    /usr/lib64/libpcre.so.1.2.7
7fd3b15e7000-7fd3b15fb000 r-xp 00000000 08:01 262192                     /lib64/libresolv-2.22.so
7fd3b15fb000-7fd3b17fa000 ---p 00014000 08:01 262192                     /lib64/libresolv-2.22.so
7fd3b17fa000-7fd3b17fb000 r--p 00013000 08:01 262192                     /lib64/libresolv-2.22.so
7fd3b17fb000-7fd3b17fc000 rw-p 00014000 08:01 262192                     /lib64/libresolv-2.22.so
7fd3b17fc000-7fd3b17fe000 rw-p 00000000 00:00 0
7fd3b17fe000-7fd3b1802000 r-xp 00000000 08:01 262242                     /lib64/libcap.so.2.22
7fd3b1802000-7fd3b1a01000 ---p 00004000 08:01 262242                     /lib64/libcap.so.2.22
7fd3b1a01000-7fd3b1a02000 r--p 00003000 08:01 262242                     /lib64/libcap.so.2.22
7fd3b1a02000-7fd3b1a03000 rw-p 00004000 08:01 262242                     /lib64/libcap.so.2.22
7fd3b1a03000-7fd3b1a26000 r-xp 00000000 08:01 262267                     /lib64/libselinux.so.1
7fd3b1a26000-7fd3b1c25000 ---p 00023000 08:01 262267                     /lib64/libselinux.so.1
7fd3b1c25000-7fd3b1c26000 r--p 00022000 08:01 262267                     /lib64/libselinux.so.1
7fd3b1c26000-7fd3b1c27000 rw-p 00023000 08:01 262267                     /lib64/libselinux.so.1
7fd3b1c27000-7fd3b1c29000 rw-p 00000000 00:00 0
7fd3b1c29000-7fd3b1c48000 r-xp 00000000 08:01 1056664                    /usr/lib64/libudev.so.1.6.4
7fd3b1c48000-7fd3b1e47000 ---p 0001f000 08:01 1056664                    /usr/lib64/libudev.so.1.6.4
7fd3b1e47000-7fd3b1e48000 r--p 0001e000 08:01 1056664                    /usr/lib64/libudev.so.1.6.4
7fd3b1e48000-7fd3b1e49000 rw-p 0001f000 08:01 1056664                    /usr/lib64/libudev.so.1.6.4
7fd3b1e49000-7fd3b1e8f000 r-xp 00000000 08:01 262236                     /lib64/libdbus-1.so.3.8.14
7fd3b1e8f000-7fd3b208e000 ---p 00046000 08:01 262236                     /lib64/libdbus-1.so.3.8.14
7fd3b208e000-7fd3b208f000 r--p 00045000 08:01 262236                     /lib64/libdbus-1.so.3.8.14
7fd3b208f000-7fd3b2090000 rw-p 00046000 08:01 262236                     /lib64/libdbus-1.so.3.8.14
7fd3b2090000-7fd3b20ac000 r-xp 00000000 08:01 1056098                    /usr/lib64/libnl-3.so.200.18.0
7fd3b20ac000-7fd3b22ab000 ---p 0001c000 08:01 1056098                    /usr/lib64/libnl-3.so.200.18.0
7fd3b22ab000-7fd3b22ad000 r--p 0001b000 08:01 1056098                    /usr/lib64/libnl-3.so.200.18.0
7fd3b22ad000-7fd3b22ae000 rw-p 0001d000 08:01 1056098                    /usr/lib64/libnl-3.so.200.18.0
7fd3b22ae000-7fd3b22b3000 r-xp 00000000 08:01 1056102                    /usr/lib64/libnl-genl-3.so.200.18.0
7fd3b22b3000-7fd3b24b3000 ---p 00005000 08:01 1056102                    /usr/lib64/libnl-genl-3.so.200.18.0
7fd3b24b3000-7fd3b24b4000 r--p 00005000 08:01 1056102                    /usr/lib64/libnl-genl-3.so.200.18.0
7fd3b24b4000-7fd3b24b5000 rw-p 00006000 08:01 1056102                    /usr/lib64/libnl-genl-3.so.200.18.0
7fd3b24b5000-7fd3b24cc000 r-xp 00000000 08:01 1057091                    /usr/lib64/libusb-1.0.so.0.1.0
7fd3b24cc000-7fd3b26cb000 ---p 00017000 08:01 1057091                    /usr/lib64/libusb-1.0.so.0.1.0
7fd3b26cb000-7fd3b26cc000 r--p 00016000 08:01 1057091                    /usr/lib64/libusb-1.0.so.0.1.0
7fd3b26cc000-7fd3b26cd000 rw-p 00017000 08:01 1057091                    /usr/lib64/libusb-1.0.so.0.1.0
7fd3b26cd000-7fd3b2867000 r-xp 00000000 08:01 262160                     /lib64/libc-2.22.so
7fd3b2867000-7fd3b2a66000 ---p 0019a000 08:01 262160                     /lib64/libc-2.22.so
7fd3b2a66000-7fd3b2a6a000 r--p 00199000 08:01 262160                     /lib64/libc-2.22.so
7fd3b2a6a000-7fd3b2a6c000 rw-p 0019d000 08:01 262160                     /lib64/libc-2.22.so
7fd3b2a6c000-7fd3b2a70000 rw-p 00000000 00:00 0
7fd3b2a70000-7fd3b2a7a000 r-xp 00000000 08:01 262222                     /lib64/libunwind.so.8.0.1
7fd3b2a7a000-7fd3b2c79000 ---p 0000a000 08:01 262222                     /lib64/libunwind.so.8.0.1
7fd3b2c79000-7fd3b2c7a000 r--p 00009000 08:01 262222                     /lib64/libunwind.so.8.0.1
7fd3b2c7a000-7fd3b2c7b000 rw-p 0000a000 08:01 262222                     /lib64/libunwind.so.8.0.1
7fd3b2c7b000-7fd3b2c89000 rw-p 00000000 00:00 0
7fd3b2c89000-7fd3b2ccb000 r-xp 00000000 08:01 1057330                    /usr/lib64/libpcap.so.1.5.3
7fd3b2ccb000-7fd3b2eca000 ---p 00042000 08:01 1057330                    /usr/lib64/libpcap.so.1.5.3
7fd3b2eca000-7fd3b2ecc000 r--p 00041000 08:01 1057330                    /usr/lib64/libpcap.so.1.5.3
7fd3b2ecc000-7fd3b2ecd000 rw-p 00043000 08:01 1057330                    /usr/lib64/libpcap.so.1.5.3
7fd3b2ecd000-7fd3b2ece000 rw-p 00000000 00:00 0
7fd3b2ece000-7fd3b2ed5000 r-xp 00000000 08:01 262194                     /lib64/librt-2.22.so
7fd3b2ed5000-7fd3b30d4000 ---p 00007000 08:01 262194                     /lib64/librt-2.22.so
7fd3b30d4000-7fd3b30d5000 r--p 00006000 08:01 262194                     /lib64/librt-2.22.so
7fd3b30d5000-7fd3b30d6000 rw-p 00007000 08:01 262194                     /lib64/librt-2.22.so
7fd3b30d6000-7fd3b31d2000 r-xp 00000000 08:01 262168                     /lib64/libm-2.22.so
7fd3b31d2000-7fd3b33d1000 ---p 000fc000 08:01 262168                     /lib64/libm-2.22.so
7fd3b33d1000-7fd3b33d2000 r--p 000fb000 08:01 262168                     /lib64/libm-2.22.so
7fd3b33d2000-7fd3b33d3000 rw-p 000fc000 08:01 262168                     /lib64/libm-2.22.so
7fd3b33d3000-7fd3b33d5000 r-xp 00000000 08:01 262166                     /lib64/libdl-2.22.so
7fd3b33d5000-7fd3b35d5000 ---p 00002000 08:01 262166                     /lib64/libdl-2.22.so
7fd3b35d5000-7fd3b35d6000 r--p 00002000 08:01 262166                     /lib64/libdl-2.22.so
7fd3b35d6000-7fd3b35d7000 rw-p 00003000 08:01 262166                     /lib64/libdl-2.22.so
7fd3b35d7000-7fd3b37b8000 r-xp 00000000 08:13 811366901                  /home/martin/git/pilight/rewrite/libpilight.so
7fd3b37b8000-7fd3b39b7000 ---p 001e1000 08:13 811366901                  /home/martin/git/pilight/rewrite/libpilight.so
7fd3b39b7000-7fd3b39cc000 r--p 001e0000 08:13 811366901                  /home/martin/git/pilight/rewrite/libpilight.so
7fd3b39cc000-7fd3b4116000 rw-p 001f5000 08:13 811366901                  /home/martin/git/pilight/rewrite/libpilight.so
7fd3b4116000-7fd3b411f000 rw-p 00000000 00:00 0
7fd3b411f000-7fd3b4137000 r-xp 00000000 08:01 262190                     /lib64/libpthread-2.22.so
7fd3b4137000-7fd3b4336000 ---p 00018000 08:01 262190                     /lib64/libpthread-2.22.so
7fd3b4336000-7fd3b4337000 r--p 00017000 08:01 262190                     /lib64/libpthread-2.22.so
7fd3b4337000-7fd3b4338000 rw-p 00018000 08:01 262190                     /lib64/libpthread-2.22.so
7fd3b4338000-7fd3b433c000 rw-p 00000000 00:00 0
7fd3b433c000-7fd3b435d000 r-xp 00000000 08:01 262152                     /lib64/ld-2.22.so
7fd3b44b7000-7fd3b44ec000 r--s 00000000 00:13 1939                       /run/nscd/dbj1Dioo (deleted)
7fd3b44ec000-7fd3b4521000 r--s 00000000 00:13 1937                       /run/nscd/passwd
7fd3b4521000-7fd3b452b000 rw-p 00000000 00:00 0
7fd3b4559000-7fd3b455c000 rw-p 00000000 00:00 0
7fd3b455c000-7fd3b455d000 r--p 00020000 08:01 262152                     /lib64/ld-2.22.so
7fd3b455d000-7fd3b455e000 rw-p 00021000 08:01 262152                     /lib64/ld-2.22.so
7fd3b455e000-7fd3b455f000 rw-p 00000000 00:00 0
7ffe7a094000-7ffe7a0b5000 rw-p 00000000 00:00 0                          [stack]
7ffe7a0db000-7ffe7a0de000 r--p 00000000 00:00 0                          [vvar]
7ffe7a0de000-7ffe7a0e0000 r-xp 00000000 00:00 0                          [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]
Aborted (core dumped)
martin@linux-s7ea:~/git/pilight/rewrite>
(basically the same thing, but now it prints a coredump too).

After running pilight-unittest about a dozen times, it gets past this issue and it does this instead (but only once, after that it segfaults during the log library tests):

Code:
martin@linux-s7ea:~/git/pilight/rewrite> ./pilight-unittest
[ test_explode                                     ]
[ test_nrcpu                                       ]
[ test_isrunning                                   ]
[ test_isnummeric                                  ]
[ test_name2uid                                    ]
[ test_strstr                                      ]
[ test_ishex                                       ]
[ test_urldecode                                   ]
[ test_urlencode                                   ]
[ test_base64decode                                ]
[ test_base64encode                                ]
[ test_hostname                                    ]
[ test_distroname                                  ]
[ test_file_exists                                 ]
[ test_path_exists                                 ]
[ test_vercmp                                      ]
[ test_uniq_space                                  ]
[ test_str_replace                                 ]
[ test_stricmp                                     ]
[ test_file_get_contents                           ]
[ test_inet_devs                                   ]
[ test_dev2mac                                     ]
[ test_host2ip                                     ]
[ test_whitelist_check                             ]
[ test_binary                                      ]
[ test_coord2tz                                    ]
[ test_datetime2ts                                 ]
[ test_localtime_l                                 ]
[ test_datefix                                     ]
[ test_json_encode                                 ]
[ test_json_decode                                 ]
[ test_sha256cache                                 ]
[ test_strptime                                    ]
[ test_options_valid                               ]
[ test_options_invalid                             ]
[ test_options_merge                               ]
[ test_dso                                         ]
[ test_eventpool_callback_nothreads                ]
[ test_eventpool_callback_threaded                 ]
[ test_log                                         ]
(/home/martin/git/pilight/rewrite/tests/log.c #42) [Jan 06 15:23:01:17023] emergency
(/home/martin/git/pilight/rewrite/tests/log.c #43) [Jan 06 15:23:01:17081] alert
(/home/martin/git/pilight/rewrite/tests/log.c #44) [Jan 06 15:23:01:17103] critical
(/home/martin/git/pilight/rewrite/tests/log.c #45) [Jan 06 15:23:01:17116] ERROR: test
(/home/martin/git/pilight/rewrite/tests/log.c #46) [Jan 06 15:23:01:17126] WARNING: test
(/home/martin/git/pilight/rewrite/tests/log.c #47) [Jan 06 15:23:01:17137] NOTICE: test
(/home/martin/git/pilight/rewrite/tests/log.c #48) [Jan 06 15:23:01:17152] INFO: test
(/home/martin/git/pilight/rewrite/tests/log.c #49) [Jan 06 15:23:01:17164] DEBUG: test
DEBUG: garbage collected log library
[ test_ssdp_client                                 ]
[ test_ssdp_server                                 ]
[ test_ntp                                         ]
[ test_ping_localhost                              ]
[ test_ping_timeout                                ]
[ test_ping_response                               ]
[ test_http                                        ]
[ test_mail                                        ]
Segmentation fault (core dumped)

Backtrace for the corrupted double-linked list:
Code:
martin@linux-s7ea:~/git/pilight/rewrite>  gdb ./pilight-unittest
GNU gdb (GDB; openSUSE Leap 42.2) 7.11.1
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-suse-linux".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://bugs.opensuse.org/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./pilight-unittest...done.
(gdb) run
Starting program: /home/martin/git/pilight/rewrite/pilight-unittest
Missing separate debuginfos, use: zypper install glibc-debuginfo-2.22-3.7.x86_64
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
[ test_explode                                     ]
[ test_nrcpu                                       ]
[ test_isrunning                                   ]
[ test_isnummeric                                  ]
[ test_name2uid                                    ]
[ test_strstr                                      ]
[ test_ishex                                       ]
[ test_urldecode                                   ]
[ test_urlencode                                   ]
[ test_base64decode                                ]
[ test_base64encode                                ]
[ test_hostname                                    ]
[ test_distroname                                  ]
[ test_file_exists                                 ]
[ test_path_exists                                 ]
[ test_vercmp                                      ]
[ test_uniq_space                                  ]
[ test_str_replace                                 ]
[ test_stricmp                                     ]
[ test_file_get_contents                           ]
[ test_inet_devs                                   ]
[ test_dev2mac                                     ]
[ test_host2ip                                     ]
[ test_whitelist_check                             ]
[ test_binary                                      ]
[ test_coord2tz                                    ]
[ test_datetime2ts                                 ]
[ test_localtime_l                                 ]
[ test_datefix                                     ]
[ test_json_encode                                 ]
[ test_json_decode                                 ]
[ test_sha256cache                                 ]
[ test_strptime                                    ]
[ test_options_valid                               ]
[ test_options_invalid                             ]
[ test_options_merge                               ]
[ test_dso                                         ]
[ test_eventpool_callback_nothreads                ]
[New Thread 0x7ffff4e17700 (LWP 1778)]
[ test_eventpool_callback_threaded                 ]
[Thread 0x7ffff4e17700 (LWP 1778) exited]
[New Thread 0x7ffff4e17700 (LWP 1779)]
[Thread 0x7ffff4e17700 (LWP 1779) exited]
[New Thread 0x7fffeffff700 (LWP 1796)]
[New Thread 0x7fffef7fe700 (LWP 1797)]
[New Thread 0x7fffeeffd700 (LWP 1798)]
[New Thread 0x7fffee7fc700 (LWP 1799)]
[ test_log                                         ]
[New Thread 0x7ffff4e17700 (LWP 1800)]
(/home/martin/git/pilight/rewrite/tests/log.c #42) [Jan 06 15:29:11:280011] emergency
(/home/martin/git/pilight/rewrite/tests/log.c #43) [Jan 06 15:29:11:280091] alert
(/home/martin/git/pilight/rewrite/tests/log.c #44) [Jan 06 15:29:11:280153] critical
(/home/martin/git/pilight/rewrite/tests/log.c #45) [Jan 06 15:29:11:280172] ERROR: test
*** Error in `/home/martin/git/pilight/rewrite/pilight-unittest': realloc(): invalid next size: 0x00007fffe8000eb0 ***
======= Backtrace: =========
/lib64/libc.so.6(+0x721af)[0x7ffff61df1af]
/lib64/libc.so.6(+0x779d6)[0x7ffff61e49d6]
/lib64/libc.so.6(+0x7aa3e)[0x7ffff61e7a3e]
/lib64/libc.so.6(realloc+0x12f)[0x7ffff61e8daf]
./libpilight.so(_realloc+0xc6)[0x7ffff7196fb7]
./libpilight.so(_logprintf+0x4dd)[0x7ffff7193d5d]
/home/martin/git/pilight/rewrite/pilight-unittest[0x4127d1]
./libpilight.so(+0xef4e8)[0x7ffff71664e8]
/lib64/libpthread.so.0(+0x8734)[0x7ffff7bc7734]
/lib64/libc.so.6(clone+0x6d)[0x7ffff6256d3d]
======= Memory map: ========
00400000-00420000 r-xp 00000000 08:13 811368660                          /home/martin/git/pilight/rewrite/pilight-unittest
0061f000-00620000 r--p 0001f000 08:13 811368660                          /home/martin/git/pilight/rewrite/pilight-unittest
00620000-0063d000 rw-p 00020000 08:13 811368660                          /home/martin/git/pilight/rewrite/pilight-unittest
0063d000-00681000 rw-p 00000000 00:00 0                                  [heap]
7fffe0000000-7fffe0021000 rw-p 00000000 00:00 0
7fffe0021000-7fffe4000000 ---p 00000000 00:00 0
7fffe8000000-7fffe8021000 rw-p 00000000 00:00 0
7fffe8021000-7fffec000000 ---p 00000000 00:00 0
7fffedffc000-7fffedffd000 ---p 00000000 00:00 0
7fffedffd000-7fffee7fd000 rw-p 00000000 00:00 0
7fffee7fd000-7fffee7fe000 ---p 00000000 00:00 0
7fffee7fe000-7fffeeffe000 rw-p 00000000 00:00 0
7fffeeffe000-7fffeefff000 ---p 00000000 00:00 0
7fffeefff000-7fffef7ff000 rw-p 00000000 00:00 0
7fffef7ff000-7fffef800000 ---p 00000000 00:00 0
7fffef800000-7ffff0000000 rw-p 00000000 00:00 0
7ffff0000000-7ffff0021000 rw-p 00000000 00:00 0
7ffff0021000-7ffff4000000 ---p 00000000 00:00 0
7ffff4400000-7ffff4416000 r-xp 00000000 08:01 262228                     /lib64/libgcc_s.so.1
7ffff4416000-7ffff4615000 ---p 00016000 08:01 262228                     /lib64/libgcc_s.so.1
7ffff4615000-7ffff4616000 r--p 00015000 08:01 262228                     /lib64/libgcc_s.so.1
7ffff4616000-7ffff4617000 rw-p 00016000 08:01 262228                     /lib64/libgcc_s.so.1
7ffff4617000-7ffff4618000 ---p 00000000 00:00 0
7ffff4618000-7ffff4e18000 rw-p 00000000 00:00 0
7ffff4e18000-7ffff4e86000 r-xp 00000000 08:01 1056074                    /usr/lib64/libpcre.so.1.2.7
7ffff4e86000-7ffff5085000 ---p 0006e000 08:01 1056074                    /usr/lib64/libpcre.so.1.2.7
7ffff5085000-7ffff5086000 r--p 0006d000 08:01 1056074                    /usr/lib64/libpcre.so.1.2.7
7ffff5086000-7ffff5087000 rw-p 0006e000 08:01 1056074                    /usr/lib64/libpcre.so.1.2.7
7ffff5087000-7ffff509b000 r-xp 00000000 08:01 262192                     /lib64/libresolv-2.22.so
7ffff509b000-7ffff529a000 ---p 00014000 08:01 262192                     /lib64/libresolv-2.22.so
7ffff529a000-7ffff529b000 r--p 00013000 08:01 262192                     /lib64/libresolv-2.22.so
7ffff529b000-7ffff529c000 rw-p 00014000 08:01 262192                     /lib64/libresolv-2.22.so
7ffff529c000-7ffff529e000 rw-p 00000000 00:00 0
7ffff529e000-7ffff52a2000 r-xp 00000000 08:01 262242                     /lib64/libcap.so.2.22
7ffff52a2000-7ffff54a1000 ---p 00004000 08:01 262242                     /lib64/libcap.so.2.22
7ffff54a1000-7ffff54a2000 r--p 00003000 08:01 262242                     /lib64/libcap.so.2.22
7ffff54a2000-7ffff54a3000 rw-p 00004000 08:01 262242                     /lib64/libcap.so.2.22
7ffff54a3000-7ffff54c6000 r-xp 00000000 08:01 262267                     /lib64/libselinux.so.1
7ffff54c6000-7ffff56c5000 ---p 00023000 08:01 262267                     /lib64/libselinux.so.1
7ffff56c5000-7ffff56c6000 r--p 00022000 08:01 262267                     /lib64/libselinux.so.1
7ffff56c6000-7ffff56c7000 rw-p 00023000 08:01 262267                     /lib64/libselinux.so.1
7ffff56c7000-7ffff56c9000 rw-p 00000000 00:00 0
7ffff56c9000-7ffff56e8000 r-xp 00000000 08:01 1056664                    /usr/lib64/libudev.so.1.6.4
7ffff56e8000-7ffff58e7000 ---p 0001f000 08:01 1056664                    /usr/lib64/libudev.so.1.6.4
7ffff58e7000-7ffff58e8000 r--p 0001e000 08:01 1056664                    /usr/lib64/libudev.so.1.6.4
7ffff58e8000-7ffff58e9000 rw-p 0001f000 08:01 1056664                    /usr/lib64/libudev.so.1.6.4
7ffff58e9000-7ffff592f000 r-xp 00000000 08:01 262236                     /lib64/libdbus-1.so.3.8.14
7ffff592f000-7ffff5b2e000 ---p 00046000 08:01 262236                     /lib64/libdbus-1.so.3.8.14
7ffff5b2e000-7ffff5b2f000 r--p 00045000 08:01 262236                     /lib64/libdbus-1.so.3.8.14
7ffff5b2f000-7ffff5b30000 rw-p 00046000 08:01 262236                     /lib64/libdbus-1.so.3.8.14
7ffff5b30000-7ffff5b4c000 r-xp 00000000 08:01 1056098                    /usr/lib64/libnl-3.so.200.18.0
7ffff5b4c000-7ffff5d4b000 ---p 0001c000 08:01 1056098                    /usr/lib64/libnl-3.so.200.18.0
7ffff5d4b000-7ffff5d4d000 r--p 0001b000 08:01 1056098                    /usr/lib64/libnl-3.so.200.18.0
7ffff5d4d000-7ffff5d4e000 rw-p 0001d000 08:01 1056098                    /usr/lib64/libnl-3.so.200.18.0
7ffff5d4e000-7ffff5d53000 r-xp 00000000 08:01 1056102                    /usr/lib64/libnl-genl-3.so.200.18.0
7ffff5d53000-7ffff5f53000 ---p 00005000 08:01 1056102                    /usr/lib64/libnl-genl-3.so.200.18.0
7ffff5f53000-7ffff5f54000 r--p 00005000 08:01 1056102                    /usr/lib64/libnl-genl-3.so.200.18.0
7ffff5f54000-7ffff5f55000 rw-p 00006000 08:01 1056102                    /usr/lib64/libnl-genl-3.so.200.18.0
7ffff5f55000-7ffff5f6c000 r-xp 00000000 08:01 1057091                    /usr/lib64/libusb-1.0.so.0.1.0
7ffff5f6c000-7ffff616b000 ---p 00017000 08:01 1057091                    /usr/lib64/libusb-1.0.so.0.1.0
7ffff616b000-7ffff616c000 r--p 00016000 08:01 1057091                    /usr/lib64/libusb-1.0.so.0.1.0
7ffff616c000-7ffff616d000 rw-p 00017000 08:01 1057091                    /usr/lib64/libusb-1.0.so.0.1.0
7ffff616d000-7ffff6307000 r-xp 00000000 08:01 262160                     /lib64/libc-2.22.so
7ffff6307000-7ffff6506000 ---p 0019a000 08:01 262160                     /lib64/libc-2.22.so
7ffff6506000-7ffff650a000 r--p 00199000 08:01 262160                     /lib64/libc-2.22.so
7ffff650a000-7ffff650c000 rw-p 0019d000 08:01 262160                     /lib64/libc-2.22.so
7ffff650c000-7ffff6510000 rw-p 00000000 00:00 0
7ffff6510000-7ffff651a000 r-xp 00000000 08:01 262222                     /lib64/libunwind.so.8.0.1
7ffff651a000-7ffff6719000 ---p 0000a000 08:01 262222                     /lib64/libunwind.so.8.0.1
7ffff6719000-7ffff671a000 r--p 00009000 08:01 262222                     /lib64/libunwind.so.8.0.1
7ffff671a000-7ffff671b000 rw-p 0000a000 08:01 262222                     /lib64/libunwind.so.8.0.1
7ffff671b000-7ffff6729000 rw-p 00000000 00:00 0
7ffff6729000-7ffff676b000 r-xp 00000000 08:01 1057330                    /usr/lib64/libpcap.so.1.5.3
7ffff676b000-7ffff696a000 ---p 00042000 08:01 1057330                    /usr/lib64/libpcap.so.1.5.3
7ffff696a000-7ffff696c000 r--p 00041000 08:01 1057330                    /usr/lib64/libpcap.so.1.5.3
7ffff696c000-7ffff696d000 rw-p 00043000 08:01 1057330                    /usr/lib64/libpcap.so.1.5.3
7ffff696d000-7ffff696e000 rw-p 00000000 00:00 0
7ffff696e000-7ffff6975000 r-xp 00000000 08:01 262194                     /lib64/librt-2.22.so
7ffff6975000-7ffff6b74000 ---p 00007000 08:01 262194                     /lib64/librt-2.22.so
7ffff6b74000-7ffff6b75000 r--p 00006000 08:01 262194                     /lib64/librt-2.22.so
7ffff6b75000-7ffff6b76000 rw-p 00007000 08:01 262194                     /lib64/librt-2.22.so
7ffff6b76000-7ffff6c72000 r-xp 00000000 08:01 262168                     /lib64/libm-2.22.so
7ffff6c72000-7ffff6e71000 ---p 000fc000 08:01 262168                     /lib64/libm-2.22.so
7ffff6e71000-7ffff6e72000 r--p 000fb000 08:01 262168                     /lib64/libm-2.22.so
7ffff6e72000-7ffff6e73000 rw-p 000fc000 08:01 262168                     /lib64/libm-2.22.so
7ffff6e73000-7ffff6e75000 r-xp 00000000 08:01 262166                     /lib64/libdl-2.22.so
7ffff6e75000-7ffff7075000 ---p 00002000 08:01 262166                     /lib64/libdl-2.22.so
7ffff7075000-7ffff7076000 r--p 00002000 08:01 262166                     /lib64/libdl-2.22.so
7ffff7076000-7ffff7077000 rw-p 00003000 08:01 262166                     /lib64/libdl-2.22.so
7ffff7077000-7ffff7258000 r-xp 00000000 08:13 811366901                  /home/martin/git/pilight/rewrite/libpilight.so
7ffff7258000-7ffff7457000 ---p 001e1000 08:13 811366901                  /home/martin/git/pilight/rewrite/libpilight.so
7ffff7457000-7ffff746c000 r--p 001e0000 08:13 811366901                  /home/martin/git/pilight/rewrite/libpilight.so
7ffff746c000-7ffff7bb6000 rw-p 001f5000 08:13 811366901                  /home/martin/git/pilight/rewrite/libpilight.so
7ffff7bb6000-7ffff7bbf000 rw-p 00000000 00:00 0
7ffff7bbf000-7ffff7bd7000 r-xp 00000000 08:01 262190                     /lib64/libpthread-2.22.so
7ffff7bd7000-7ffff7dd6000 ---p 00018000 08:01 262190                     /lib64/libpthread-2.22.so
7ffff7dd6000-7ffff7dd7000 r--p 00017000 08:01 262190                     /lib64/libpthread-2.22.so
7ffff7dd7000-7ffff7dd8000 rw-p 00018000 08:01 262190                     /lib64/libpthread-2.22.so
7ffff7dd8000-7ffff7ddc000 rw-p 00000000 00:00 0
7ffff7ddc000-7ffff7dfd000 r-xp 00000000 08:01 262152                     /lib64/ld-2.22.so
7ffff7f52000-7ffff7f87000 r--s 00000000 00:13 1939                       /run/nscd/dbj1Dioo (deleted)
7ffff7f87000-7ffff7fbc000 r--s 00000000 00:13 1937                       /run/nscd/passwd
7ffff7fbc000-7ffff7fc6000 rw-p 00000000 00:00 0
7ffff7ff4000-7ffff7ff7000 rw-p 00000000 00:00 0
7ffff7ff7000-7ffff7ffa000 r--p 00000000 00:00 0                          [vvar]
7ffff7ffa000-7ffff7ffc000 r-xp 00000000 00:00 0                          [vdso]
7ffff7ffc000-7ffff7ffd000 r--p 00020000 08:01 262152                     /lib64/ld-2.22.so
7ffff7ffd000-7ffff7ffe000 rw-p 00021000 08:01 262152                     /lib64/ld-2.22.so
7ffff7ffe000-7ffff7fff000 rw-p 00000000 00:00 0
7ffffffde000-7ffffffff000 rw-p 00000000 00:00 0                          [stack]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]

Thread 8 "pilight-unittes" received signal SIGABRT, Aborted.
[Switching to Thread 0x7ffff4e17700 (LWP 1800)]
0x00007ffff61a18d7 in raise () from /lib64/libc.so.6
Missing separate debuginfos, use: zypper install libcap2-debuginfo-2.22-16.55.x86_64 libdbus-1-3-debuginfo-1.8.22-1.1.x86_64 libgcc_s1-gcc6-debuginfo-6.1.1+r238085-1.12.x86_64 libnl3-200-debuginfo-3.2.23-4.5.x86_64 libpcap1-debuginfo-1.5.3-6.1.x86_64 libpcre1-debuginfo-8.39-6.1.x86_64 libselinux1-debuginfo-2.5-2.12.x86_64 libudev1-debuginfo-228-15.1.x86_64 libunwind-debuginfo-1.1-12.5.x86_64 libusb-1_0-0-debuginfo-1.0.20-3.4.x86_64
(gdb) bt full
#0  0x00007ffff61a18d7 in raise () from /lib64/libc.so.6
No symbol table info available.
#1  0x00007ffff61a2caa in abort () from /lib64/libc.so.6
No symbol table info available.
#2  0x00007ffff61df1b4 in __libc_message () from /lib64/libc.so.6
No symbol table info available.
#3  0x00007ffff61e49d6 in malloc_printerr () from /lib64/libc.so.6
No symbol table info available.
#4  0x00007ffff61e7a3e in _int_realloc () from /lib64/libc.so.6
No symbol table info available.
#5  0x00007ffff61e8daf in realloc () from /lib64/libc.so.6
No symbol table info available.
#6  0x00007ffff7196fb7 in _realloc (a=0x7fffe8000eb0, b=95, file=0x7ffff7228b00 "/home/martin/git/pilight/rewrite/libs/pilight/core/log.c", line=196) at /home/martin/git/pilight/rewrite/libs/pilight/core/mem.c:174
        tmp = 0x7fffe80008c0
#7  0x00007ffff7193d5d in _logprintf (prio=4, file=0x41bee0 "/home/martin/git/pilight/rewrite/tests/log.c", line=46, str=0x41bf29 "test") at /home/martin/git/pilight/rewrite/libs/pilight/core/log.c:196
        tv = {tv_sec = 1483716551, tv_usec = 280185}
        tm = {tm_sec = 11, tm_min = 29, tm_hour = 15, tm_mday = 6, tm_mon = 0, tm_year = 117, tm_wday = 5, tm_yday = 5, tm_isdst = 0, tm_gmtoff = 0, tm_zone = 0x7ffff62d3a80 "GMT"}
        ap = {{gp_offset = 32, fp_offset = 48, overflow_arg_area = 0x7ffff4e16dc0, reg_save_area = 0x7ffff4e16d00}}
        apcpy = {{gp_offset = 32, fp_offset = 48, overflow_arg_area = 0x7ffff4e16dc0, reg_save_area = 0x7ffff4e16d00}}
        fmt = "Jan 06 15:29:11\000Pl\341\364\377\177\000\000@l\341\364\377\177\000\000\031M\337P\000\000\000\000\231+@\000\000\000\000\000\377\377\377\377\000\000\000\000\360g\377\367\377\177\000"
        buffer = 0x7fffe8000eb0 "(/home/martin/git/pilight/rewrite/tests/log.c #46) [Jan 06 15:29:11:280185] WARNING: "
        errcpy = 0
---Type <return> to continue, or q <return> to quit---
        len = 4
        pos = 88
        bufsize = 89
#8  0x00000000004127d1 in test (param=0x0) at /home/martin/git/pilight/rewrite/tests/log.c:46
No locals.
#9  0x00007ffff71664e8 in uv__thread_start (arg=0x669fa0) at /home/martin/git/pilight/rewrite/libs/libuv/unix/thread.c:52
        ctx_p = 0x669fa0
        ctx = {entry = 0x412732 <test>, arg = 0x0}
#10 0x00007ffff7bc7734 in start_thread () from /lib64/libpthread.so.0
No symbol table info available.
#11 0x00007ffff6256d3d in clone () from /lib64/libc.so.6
No symbol table info available.
(gdb)
 
Reply
#16
I just can't replicate it... Surprised
 
Reply
#17
I can't get the actual pilight-daemon running either, no idea what I'm doing wrong here:

I keep getting
Code:
ERROR: config setting #2 "pid-file" must point to an existing folder
, not matter what I put in the setting; I've tried these (and probably more that I've forgotten now):
Code:
.
./
./pilight.pid
pilight.pid
/var/run
/var/run/
/var/run/pilight.pid

When I enter a path to a valid directory (such as "/var/run/" or "./"), I get:
Code:
[Jan 06 16:10:05:659044] ERROR: could not open / create pid_file ./

When I enter a path to a (not yet existing) pilight.pid file (such as "./pilight.pid" or "/var/run/pilight.pid", I get:
Code:
ERROR: config setting #2 "pid-file" must point to an existing folder

What do?? Quite picky, this one Wink
What do you have in your config.json?


I don't understand it either. These are two different computers with different hardware, everything. Different version of openSUSE too. No idea what's going on...
 
Reply
#18
The daemon is not supposed to work at this moment.

Can you check if the log update fixes things for you?
 
Reply
#19
Oh, ok Smile

Currently getting this compilation error since the commit for API protocol tests:
Code:
martin@linux-027e:~/builds/pilight/rewrite>  make -j5
Scanning dependencies of target DSO
[  0%] Built target DSO
[  0%] Built target dso_shared
Scanning dependencies of target pilight
[  0%] Building C object CMakeFiles/pilight.dir/libs/pilight/core/log.c.o
[  1%] Building C object CMakeFiles/pilight.dir/libs/pilight/protocols/API/datetime.c.o
[  1%] Building C object CMakeFiles/pilight.dir/libs/pilight/protocols/API/cpu_temp.c.o
[  2%] Building C object CMakeFiles/pilight.dir/libs/pilight/protocols/protocol.c.o
[  3%] Building C object CMakeFiles/pilight.dir/libs/pilight/protocols/API/openweathermap.c.o
/home/martin/builds/pilight/rewrite/libs/pilight/protocols/API/datetime.c: In function ‘datetimeInit’:
/home/martin/builds/pilight/rewrite/libs/pilight/protocols/API/cpu_temp.c: In function ‘cpuTempInit’:
/home/martin/builds/pilight/rewrite/libs/pilight/protocols/API/cpu_temp.c:249:21: error: ‘REASON_DEVICE_ADAPT’ undeclared (first use in this function)
  eventpool_callback(REASON_DEVICE_ADAPT, adaptDevice);
                     ^
/home/martin/builds/pilight/rewrite/libs/pilight/protocols/API/datetime.c:289:21: error: ‘REASON_DEVICE_ADAPT’ undeclared (first use in this function)
  eventpool_callback(REASON_DEVICE_ADAPT, adaptDevice);
                     ^
/home/martin/builds/pilight/rewrite/libs/pilight/protocols/API/cpu_temp.c:249:21: note: each undeclared identifier is reported only once for each function it appears in
/home/martin/builds/pilight/rewrite/libs/pilight/protocols/API/datetime.c:289:21: note: each undeclared identifier is reported only once for each function it appears in
/home/martin/builds/pilight/rewrite/libs/pilight/protocols/API/openweathermap.c: In function ‘openweathermapInit’:
/home/martin/builds/pilight/rewrite/libs/pilight/protocols/API/openweathermap.c:492:21: error: ‘REASON_DEVICE_ADAPT’ undeclared (first use in this function)
  eventpool_callback(REASON_DEVICE_ADAPT, adaptDevice);
                     ^
/home/martin/builds/pilight/rewrite/libs/pilight/protocols/API/openweathermap.c:492:21: note: each undeclared identifier is reported only once for each function it appears in
CMakeFiles/pilight.dir/build.make:5880: recipe for target 'CMakeFiles/pilight.dir/libs/pilight/protocols/API/openweathermap.c.o' failed
make[2]: *** [CMakeFiles/pilight.dir/libs/pilight/protocols/API/openweathermap.c.o] Error 1
make[2]: *** Waiting for unfinished jobs....
CMakeFiles/pilight.dir/build.make:5811: recipe for target 'CMakeFiles/pilight.dir/libs/pilight/protocols/API/cpu_temp.c.o' failed
make[2]: *** [CMakeFiles/pilight.dir/libs/pilight/protocols/API/cpu_temp.c.o] Error 1
CMakeFiles/pilight.dir/build.make:5834: recipe for target 'CMakeFiles/pilight.dir/libs/pilight/protocols/API/datetime.c.o' failed
make[2]: *** [CMakeFiles/pilight.dir/libs/pilight/protocols/API/datetime.c.o] Error 1
CMakeFiles/Makefile2:617: recipe for target 'CMakeFiles/pilight.dir/all' failed
make[1]: *** [CMakeFiles/pilight.dir/all] Error 2
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2

I hope it's not completely weird again :/
 
Reply
#20
No, i forgot to add two files.
 
Reply
  


Forum Jump:


Browsing: 1 Guest(s)