Missed return statement (debugging showed that currently g++ with optimization level -O1 or higher doesn't insert return automatically, and execution enters another function with garbage in the stack).
Possible access to the element of empty array (ourId[0]).
As to the missed return, maybe it's something specific to pthread, but in gdb the execution jumps from ThreadDNS to ThreadSeeder without returning to the caller.
This PR fixes two issues found:
return
statement (debugging showed that currently g++ with optimization level-O1
or higher doesn't insertreturn
automatically, and execution enters another function with garbage in the stack).ourId[0]
).