Open Arkadietz opened 8 years ago
kiril@Hyperion(~/SIS)$ gdb eggdrop core
GNU gdb (Debian 7.7.1+dfsg-5) 7.7.1
Copyright (C) 2014 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-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
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 eggdrop...done.
warning: core file may not match specified executable file.
[New LWP 26856]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `./eggdrop SIS.conf'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x00007f2733c19dcc in _IO_vfprintf_internal (s=s@entry=0x7ffe16340e90, format=<optimized out>, format@entry=0x7f2731286ba2 "%s</span>", ap=ap@entry=0x7ffe16340ff8) at vfprintf.c:1642
1642 vfprintf.c: No such file or directory.
(gdb) bt full
#0 0x00007f2733c19dcc in _IO_vfprintf_internal (s=s@entry=0x7ffe16340e90, format=<optimized out>, format@entry=0x7f2731286ba2 "%s</span>", ap=ap@entry=0x7ffe16340ff8) at vfprintf.c:1642
len = <optimized out>
string_malloced = <optimized out>
step0_jumps = {0, -21408, -10006, -9919, -9825, -9738, -9633, -9357, -8392, -7901, -7780, -7036, -7329, -7232, -6868, -9131, -2198, -2183, -4523, -4438, -1471, -3815, -1799, -4599, -168, -1104, -2074, -7135, -7232, -9460}
space = 0
is_short = 0
use_outdigits = 0
step1_jumps = {0, 0, 0, 0, 0, 0, 0, 0, 0, -7901, -7780, -7036, -7329, -7232, -6868, -9131, -2198, -2183, -4523, -4438, -1471, -3815, -1799, -4599, -168, -1104, -2074, -7135, -7232, 0}
group = 0
prec = -1
step2_jumps = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -7780, -7036, -7329, -7232, -6868, -9131, -2198, -2183, -4523, -4438, -1471, -3815, -1799, -4599, -168, -1104, -2074, -7135, -7232, 0}
string = <optimized out>
left = 0
is_long_double = 0
width = 0
step3a_jumps = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -7133, 0, 0, 0, -6868, -9131, -2198, -2183, -4523, 0, 0, 0, 0, -4599, 0, 0, 0, 0, 0, 0}
alt = 0
showsign = 0
is_long = 0
is_char = 0
pad = 32 ' '
step3b_jumps = {0 <repeats 11 times>, -7329, 0, 0, -6868, -9131, -2198, -2183, -4523, -4438, -1471, -3815, -1799, -4599, -168, -1104, -2074, 0, 0, 0}
step4_jumps = {0 <repeats 14 times>, -6868, -9131, -2198, -2183, -4523, -4438, -1471, -3815, -1799, -4599, -168, -1104, -2074, 0, 0, 0}
is_negative = <optimized out>
number = <optimized out>
base = <optimized out>
the_arg = {pa_wchar = 824731957 L'\x31286935', pa_int = 824731957, pa_long_int = 139806305184053, pa_long_long_int = 139806305184053, pa_u_int = 824731957, pa_u_long_int = 139806305184053, pa_u_long_long_int = 139806305184053,
pa_double = 6.907349246343756e-310, pa_long_double = <invalid float value>, pa_string = 0x7f2731286935 "",
pa_wstring = 0x7f2731286935 L"\x25002f00\x25732573\x25642573\x25643230\x5f643230\x64256770\x6d74682e\x6277006c\x65683c00\xa3e6461\x682f3c00\x3e646165\x3c000a0a\x79646f62\x616c6320\x223d7373\x4c68326c\x6150676f\x3e226567\x3c09000a\x20766964\x223d6469\x746e6f63\x656e6961\xa3e2272\x3c090900\x20766964\x223d6469\x745f706c\x3e22706f\x90a000a\x642f3c09\xa3e7669\x3c090900\x20766964\x223d6469\x64616568\x3e227265\x909000a\x7669643c\x3d646920\x69616d22\x6f6c626e\x3e226b63\x2d2d000a\x4100202d\x6f697463\x203a6e\x2000203e\x6e696f6a\x206465\x6170733c\x6c63206e\x3d737361\x736c6522\x226a5f65\x626e263e\x3b7073\x66656c20\x72692074\x203a63\x6170733c\x6c63206e\x3d737361\x736c6522\x696c5f65\x6e263e22\x3b707362\x656c2000\x207466\x6170733c\x6c63206e\x3d737361\x736c6522\x226c5f65\x626e263e\x3b7073\x6b63694e\x61686320\x3a65676e\x733c0020\x206e6170\x73616c63\x65223d73\x5f65736c\x263e226e\x7073626e\x203a003b\x65646f6d\x61686320\x2065676e\x733c0027\x206e6170\x73616c63\x65223d73\x5f65736c\x263e226d\x7073626e\x6b20003b\x656b6369\x72662064\x206d6f\x6170733c\x6c63206e\x3d737361\x736c6522\x226b5f65\x626e263e\x3b7073\x6170733c\x6c63206e\x3d737361\x736c6522\x263e2265\x7073626e\x2563003b\x322e3230\x32302564\x64322e\x32302566\x64322e\x746e6f66\x6965772d\x3a746867\x646c6f62\x6e6f6600\x74732d74\x3a656c79\x6c617469\x74006369\x2d747865\x6f636564\x69746172\x753a6e6f\x7265646e\x656e696c\x70746600\x733c002e\x206e6170\x73616c63\x25223d73\x3e2273\x6170733c\x7473206e\x3d656c79\x22732522\x613c003e\x65726820\x6d223d66\x746c6961\x73253a6f\x3c003e22\x72682061\x223d6665\x3e227325\x3c732500\x6170732f\x61003e6e\x9090062\x7669643c\x3d646920\x76616e22\x74746f62\x3e226d6f\x72623c00\x3e2f20\x623c0909\x6c632072\x3d737361\x656c6322\x6c667261\x2274616f\xa3e2f20\x3c090900\x20766964\x223d6469\x625f706c\x6f74746f\xa3e226d\x622f3c00\x3e79646f\x2f3c000a\x6c6d7468\x6f000a3e\x65006464\x6e6576\x73257325\x61666564\x2e746c75\x737363\x61686340\x74657372\x74752220\x22382d66\x2f000a3b\x5343202a\x6f442053\x656d7563\x2a20746e\xa0a2f"..., pa_pointer = 0x7f2731286935, pa_user = 0x7f2731286935}
spec = 115 's'
_buffer = {__routine = 0x7ffe16340a90, __arg = 0x3000000018, __canceltype = 372510960, __prev = 0x7ffe16341030}
_avail = <optimized out>
thousands_sep = 0x0
grouping = 0xffffffffffffffff <error: Cannot access memory at address 0xffffffffffffffff>
done = 0
f = 0x7f2731286ba3 "s</span>"
lead_str_end = <optimized out>
end_of_spec = <optimized out>
work_buffer = "\340\f4\026\376\177\000\000\000p\\\002\000\000\000\000\027\000E\000\000\000\000\000\000p\\\002\000\000\000\000\220\222f\002", '\000' <repeats 13 times>, "p\\\002", '\000' <repeats 12 times>, "\001\200\255\373\000\000\000\000\000\352\241\017\335\376\343\071\340\f4\026\376\177\000\000\001\000\000\000\000\000\000\000 \211]\002\000\000\000\000\000p\\\002\000\000\000\000\220\222f\002\000\000\000\000\001\000\000\000\000\000\000\000\220\fb\002\000\000\000\000\235|\342\064'\177\000\000\310\v4\026\376\177\000\000\001\000\000\000\000\000\000\000\020\322\\\002\000\000\000\000\000\000\000\000\001\000\000\000\320\v4\026\376\177\000\000\060\232f\002\000\000\000\000\000\000]\002\000\000\000\000\000\000\000\000"...
workstart = 0x0
workend = 0x7ffe16340e48 "\220\016\064\026\376\177"
ap_save = {{gp_offset = 24, fp_offset = 48, overflow_arg_area = 0x7ffe163410f0, reg_save_area = 0x7ffe16341010}}
nspecs_done = 0
save_errno = <optimized out>
readonly_format = 0
args_malloced = 0x0
specs = <optimized out>
specs_malloced = false
jump_table = "\001\000\000\004\000\016\000\006\000\000\a\002\000\003\t\000\005\b\b\b\b\b\b\b\b\b\000\000\000\000\000\000\000\032\000\031\000\023\023\023\000\035\000\000\f\000\000\000\000\000\000\025\000\000\000\000\022\000\r\000\000\000\000\000\000\032\000\024\017\023\023\023\n\017\034\000\v\030\027\021\026\f\000\025\033\020\000\000\022\000\r"
__PRETTY_FUNCTION__ = "_IO_vfprintf_internal"
#1 0x00007f2733c41409 in _IO_vsnprintf (string=0x2719fa0 "", maxlen=<optimized out>, format=0x7f2731286ba2 "%s</span>", args=0x7ffe16340ff8) at vsnprintf.c:119
sf = {f = {_sbf = {_f = {_flags = -72515583, _IO_read_ptr = 0x2719fa0 "", _IO_read_end = 0x2719fa0 "", _IO_read_base = 0x2719fa0 "", _IO_write_base = 0x2719fa0 "", _IO_write_ptr = 0x2719fa0 "", _IO_write_end = 0x271a19f "",
_IO_buf_base = 0x2719fa0 "", _IO_buf_end = 0x271a19f "", _IO_save_base = 0x0, _IO_backup_base = 0x0, _IO_save_end = 0x0, _markers = 0x0, _chain = 0x0, _fileno = 40979885, _flags2 = 0, _old_offset = 140880,
_cur_column = 0, _vtable_offset = -80 '\260', _shortbuf = "", _lock = 0x0, _offset = 40982720, _codecvt = 0x200, _wide_data = 0xffffffffffffffff, _freeres_list = 0x0, _freeres_buf = 0x26f4660, _freeres_size = 4388435,
_mode = -1, _unused2 = "2html:fileopera\000ions"}, vtable = 0x7f2733f73460 <_IO_strn_jumps>}, _s = {_allocate_buffer = 0x0, _free_buffer = 0x3000000028}},
overflow_buf = "P\020\064\026\376\177\000\000\a9\304\063'\177\000\000`Fo\002\000\000\000\000\001\000\000\000\000\000\000\000\004\000\000\000\000\000\000\000\004\000\000\000\000\000\000\000\360\330p\002\000\000\000\000\255\232\303\063'\177\000"}
---Type <return> to continue, or q <return> to quit---
1st: the update core dump from 18. aug. is shortened and i cant get information out of it.
2nd: but the 1st core dump shows everything such a coredump can: the issue is a nullpointer.
got_ban() calles newban(chan, ...) calles newmask((chan)->channel.ban, ...)
i wasted some time figuring out, which conditions could lead to channel.ban be NULL, without success.
i give up here.
maybe an additional log file of what happened before would help.
Could we add something like https://github.com/eggheads/eggdrop/blob/develop/src/botnet.c#L948 to the code and close this PR (until feedback)?
scan-build found the following, which looks related:
290 | static void newmask(masklist *m, char *s, char *who)
-- | --
291 | {
292 | for (; m && m->mask[0] && rfc_casecmp(m->mask, s); m = m->next);
| Assuming 'm' is null→ |
293 | if (m->mask[0])
| Access to field 'mask' results in a dereference of a null pointer (loaded from variable 'm') |
Full Patch List: CVS 1412277709 infiniteinfo
equals 24da99cb3846f9cd8fa030ca1c732a2b6ec2d997
Hello,
This is what DEBUG.txt says:
This is what core file says: