winix/winixd/core
Tomasz Sowa 4832c7db4b fixed: clang address sanitizer reports that there is an use after free bug at the end when winix shuts down:
==3859==ERROR: AddressSanitizer: heap-use-after-free on address 0x61b0000053e0 at pc 0x000800697160 bp 0x7fffffffcfb0 sp 0x7fffffffcfa8
READ of size 8 at 0x61b0000053e0 thread T0
    #0 0x80069715f in PT::MemBuffer<wchar_t, 256ul, 4096ul>::empty() const /usr/home/tomek/roboczy/prog/web.ttmath.org/../pikotools/membuffer/membuffer.h:675:9
    #1 0x80069700d in PT::TextStreamBase<wchar_t, 256ul, 4096ul>::empty() const /usr/home/tomek/roboczy/prog/web.ttmath.org/../pikotools/textstream/textstream.h:161:16
    #2 0x8009af0e3 in PT::FileLog::save_log(PT::TextStreamBase<wchar_t, 256ul, 4096ul>*) /usr/home/tomek/roboczy/prog/pikotools/log/filelog.cpp:105:14
    #3 0x8009b3f8a in PT::Log::save_log() /usr/home/tomek/roboczy/prog/pikotools/log/log.cpp:461:13
    #4 0x8009b3d72 in PT::Log::save_log_and_clear() /usr/home/tomek/roboczy/prog/pikotools/log/log.cpp:448:2
    #5 0x8009b0627 in PT::Log::~Log() /usr/home/tomek/roboczy/prog/pikotools/log/log.cpp:62:2
    #6 0x8007288e7 in Winix::Log::~Log() /usr/home/tomek/roboczy/prog/winix/winixd/core/log.cpp:56:1
    #7 0x8007eac96 in Winix::WinixBase::~WinixBase() /usr/home/tomek/roboczy/prog/winix/winixd/core/winixbase.cpp:51:1
    #8 0x8007eb097 in Winix::WinixModel::~WinixModel() /usr/home/tomek/roboczy/prog/winix/winixd/core/winixmodel.cpp:52:1
    #9 0x80069e552 in Winix::BaseThread::~BaseThread() /usr/home/tomek/roboczy/prog/winix/winixd/core/basethread.cpp:54:1
    #10 0x2f8132 in Winix::Job::~Job() /usr/home/tomek/roboczy/prog/web.ttmath.org/../winix/winixd/core/job.h:54:7
    #11 0x2e0c8a in Winix::System::~System() /usr/home/tomek/roboczy/prog/web.ttmath.org/../winix/winixd/core/system.h:67:7
    #12 0x2df017 in Winix::App::~App() /usr/home/tomek/roboczy/prog/web.ttmath.org/../winix/winixd/core/app.h:70:7
    #13 0x800cc9f50 in __cxa_finalize /hddraidzfs/usr/src/lib/libc/stdlib/atexit.c:238:5
    #14 0x800c5ef10 in exit /hddraidzfs/usr/src/lib/libc/stdlib/exit.c:74:2
    #15 0x25c935 in _start /hddraidzfs/usr/src/lib/csu/amd64/crt1.c:76:2

0x61b0000053e0 is located 1632 bytes inside of 1656-byte region [0x61b000004d80,0x61b0000053f8)
freed by thread T0 here:
    #0 0x2dc07d in operator delete(void*) /hddraidzfs/usr/src/contrib/llvm-project/compiler-rt/lib/asan/asan_new_delete.cpp:160:3
    #1 0x8007c3b2c in Winix::ThreadManager::StopAll() /usr/home/tomek/roboczy/prog/winix/winixd/core/threadmanager.cpp:189:3
    #2 0x800647474 in Winix::App::WaitForThreads() /usr/home/tomek/roboczy/prog/winix/winixd/core/app.cpp:2122:24
    #3 0x800647311 in Winix::App::Close() /usr/home/tomek/roboczy/prog/winix/winixd/core/app.cpp:340:2
    #4 0x2dec7c in main /usr/home/tomek/roboczy/prog/winix/winixd/main/main.cpp:224:6
    #5 0x25c92e in _start /hddraidzfs/usr/src/lib/csu/amd64/crt1.c:76:7
    #6 0x80033efff  (<unknown module>)

previously allocated by thread T0 here:
    #0 0x2db81d in operator new(unsigned long) /hddraidzfs/usr/src/contrib/llvm-project/compiler-rt/lib/asan/asan_new_delete.cpp:99:3
    #1 0x8007c17c3 in Winix::ThreadManager::Add(Winix::BaseThread*, wchar_t const*) /usr/home/tomek/roboczy/prog/winix/winixd/core/threadmanager.cpp:77:26
    #2 0x8007b0b81 in Winix::System::Init() /usr/home/tomek/roboczy/prog/winix/winixd/core/system.cpp:170:17
    #3 0x8006468d4 in Winix::App::Init() /usr/home/tomek/roboczy/prog/winix/winixd/core/app.cpp:295:9
    #4 0x2deb7e in main /usr/home/tomek/roboczy/prog/winix/winixd/main/main.cpp:206:11
    #5 0x25c92e in _start /hddraidzfs/usr/src/lib/csu/amd64/crt1.c:76:7
    #6 0x80033efff  (<unknown module>)

in ThreadManager::StopAll() there is item.thread_item_data pointer which was freed (the pointer was pointing to an object with a log_buffer)
but internal Log buffer from item.object was pointing to that object and when thread_tab.clear() was called then the d-ctor was called
and then save_log_and_clear() method was called and tried to use the freed object.
2021-02-17 15:58:05 +01:00
..
Makefile Makefiles: added path to morm/src to -I flags 2018-11-23 18:28:15 +00:00
Makefile.dep Makefile deps 2019-09-25 16:25:44 +00:00
Makefile.o.dep start working on 0.7.x branch 2018-11-21 11:03:53 +00:00
acceptbaseparser.cpp moved winix directories to winixd subdirectory 2016-03-17 08:24:59 +00:00
acceptbaseparser.h start working on 0.7.x branch 2018-11-21 11:03:53 +00:00
acceptencodingparser.h moved winix directories to winixd subdirectory 2016-03-17 08:24:59 +00:00
app.cpp changed: if there is no body we do not parse application/json to space 2019-03-25 00:51:51 +00:00
app.h - json_generic_serializer was not set when there was a redirect 2019-02-19 10:36:20 +00:00
basethread.cpp fixed: clang address sanitizer reports that there is an use after free bug at the end when winix shuts down: 2021-02-17 15:58:05 +01:00
basethread.h fixed: permissions to symlinks and directories with redirect flag were incorrectly checked 2019-03-19 18:08:09 +00:00
bbcodeparser.cpp added to HTMLFilter: 2018-10-24 16:31:42 +00:00
bbcodeparser.h added to HTMLFilter: 2018-10-24 16:31:42 +00:00
compress.cpp moved winix directories to winixd subdirectory 2016-03-17 08:24:59 +00:00
compress.h start working on 0.7.x branch 2018-11-21 11:03:53 +00:00
config.cpp added: generic html template: index_generic.html 2021-01-27 18:31:48 +01:00
config.h added: generic html template: index_generic.html 2021-01-27 18:31:48 +01:00
cookieparser.h moved winix directories to winixd subdirectory 2016-03-17 08:24:59 +00:00
crypt.cpp updated to the new pikotools api - we have a logger for morm and ezc 2018-11-23 17:53:43 +00:00
crypt.h start working on 0.7.x branch 2018-11-21 11:03:53 +00:00
cur.h moved winix directories to winixd subdirectory 2016-03-17 08:24:59 +00:00
dircontainer.cpp moved winix directories to winixd subdirectory 2016-03-17 08:24:59 +00:00
dircontainer.h start working on 0.7.x branch 2018-11-21 11:03:53 +00:00
dirs.cpp some work in the new api: 2018-11-21 22:53:24 +00:00
dirs.h some work in the new api: 2018-11-21 22:53:24 +00:00
error.h moved winix directories to winixd subdirectory 2016-03-17 08:24:59 +00:00
filelog.cpp fixed: FileLog::get_local_date we need to synchronize when using time_zones pointer 2019-09-25 16:25:20 +00:00
filelog.h updated to the new pikotools api - we have a logger for morm and ezc 2018-11-23 17:53:43 +00:00
group.h moved winix directories to winixd subdirectory 2016-03-17 08:24:59 +00:00
groups.cpp start working on 0.7.x branch 2018-11-21 11:03:53 +00:00
groups.h start working on 0.7.x branch 2018-11-21 11:03:53 +00:00
htmlfilter.cpp some work on dependency injection 2018-11-21 17:51:15 +00:00
htmlfilter.h some work on dependency injection 2018-11-21 17:51:15 +00:00
httpsimpleparser.cpp moved winix directories to winixd subdirectory 2016-03-17 08:24:59 +00:00
httpsimpleparser.h start working on 0.7.x branch 2018-11-21 11:03:53 +00:00
image.cpp start working on 0.7.x branch 2018-11-21 11:03:53 +00:00
image.h moved winix directories to winixd subdirectory 2016-03-17 08:24:59 +00:00
ipban.h moved winix directories to winixd subdirectory 2016-03-17 08:24:59 +00:00
ipbancontainer.cpp moved winix directories to winixd subdirectory 2016-03-17 08:24:59 +00:00
ipbancontainer.h start working on 0.7.x branch 2018-11-21 11:03:53 +00:00
item.cpp fixed: static files loaded to /var such as /var/ckeditor_winix.js were not properly returned 2016-07-13 13:13:56 +00:00
item.h fixed: static files loaded to /var such as /var/ckeditor_winix.js were not properly returned 2016-07-13 13:13:56 +00:00
job.cpp fixed: permissions to symlinks and directories with redirect flag were incorrectly checked 2019-03-19 18:08:09 +00:00
job.h moved winix directories to winixd subdirectory 2016-03-17 08:24:59 +00:00
lastcontainer.cpp moved winix directories to winixd subdirectory 2016-03-17 08:24:59 +00:00
lastcontainer.h start working on 0.7.x branch 2018-11-21 11:03:53 +00:00
loadavg.cpp updated to the new pikotools api - we have a logger for morm and ezc 2018-11-23 17:53:43 +00:00
loadavg.h some work in the new api: 2018-11-21 22:53:24 +00:00
lock.cpp moved winix directories to winixd subdirectory 2016-03-17 08:24:59 +00:00
lock.h moved winix directories to winixd subdirectory 2016-03-17 08:24:59 +00:00
log.cpp fixed: FileLog::get_local_date we need to synchronize when using time_zones pointer 2019-09-25 16:25:20 +00:00
log.h fixed: FileLog::get_local_date we need to synchronize when using time_zones pointer 2019-09-25 16:25:20 +00:00
logmanipulators.h updated to the new pikotools api - we have a logger for morm and ezc 2018-11-23 17:53:43 +00:00
misc.cpp start working on 0.7.x branch 2018-11-21 11:03:53 +00:00
misc.h using PT::IsSubString* methods from pikotools 2018-11-01 00:46:44 +00:00
mount.cpp moved winix directories to winixd subdirectory 2016-03-17 08:24:59 +00:00
mount.h moved winix directories to winixd subdirectory 2016-03-17 08:24:59 +00:00
mountparser.cpp start working on 0.7.x branch 2018-11-21 11:03:53 +00:00
mountparser.h start working on 0.7.x branch 2018-11-21 11:03:53 +00:00
mounts.cpp fixed: in Functions::CheckSpecialFile() after parsing new mount points 2021-02-16 17:23:36 +01:00
mounts.h start working on 0.7.x branch 2018-11-21 11:03:53 +00:00
plugin.cpp fixed: crash in thread plugin 2019-01-02 11:33:19 +00:00
plugin.h fixed: crash in thread plugin 2019-01-02 11:33:19 +00:00
plugindata.cpp start working on 0.7.x branch 2018-11-21 11:03:53 +00:00
plugindata.h start working on 0.7.x branch 2018-11-21 11:03:53 +00:00
pluginmsg.h moved winix directories to winixd subdirectory 2016-03-17 08:24:59 +00:00
postmultiparser.cpp using PT::IsSubString* methods from pikotools 2018-11-01 00:46:44 +00:00
postmultiparser.h start working on 0.7.x branch 2018-11-21 11:03:53 +00:00
postparser.h start working on 0.7.x branch 2018-11-21 11:03:53 +00:00
rebus.cpp moved winix directories to winixd subdirectory 2016-03-17 08:24:59 +00:00
rebus.h start working on 0.7.x branch 2018-11-21 11:03:53 +00:00
request.cpp added: generic html template: index_generic.html 2021-01-27 18:31:48 +01:00
request.h added: generic html template: index_generic.html 2021-01-27 18:31:48 +01:00
requesttypes.h moved winix directories to winixd subdirectory 2016-03-17 08:24:59 +00:00
run.cpp start working on 0.7.x branch 2018-11-21 11:03:53 +00:00
run.h start working on 0.7.x branch 2018-11-21 11:03:53 +00:00
session.cpp start working on 0.7.x branch 2018-11-21 11:03:53 +00:00
session.h added: antispam mechanism 2018-07-02 11:16:36 +00:00
sessioncontainer.cpp start working on 0.7.x branch 2018-11-21 11:03:53 +00:00
sessioncontainer.h start working on 0.7.x branch 2018-11-21 11:03:53 +00:00
sessionidmanager.cpp start working on 0.7.x branch 2018-11-21 11:03:53 +00:00
sessionidmanager.h start working on 0.7.x branch 2018-11-21 11:03:53 +00:00
sessionmanager.cpp fixed: permissions to symlinks and directories with redirect flag were incorrectly checked 2019-03-19 18:08:09 +00:00
sessionmanager.h fixed: permissions to symlinks and directories with redirect flag were incorrectly checked 2019-03-19 18:08:09 +00:00
sessionparser.cpp moved winix directories to winixd subdirectory 2016-03-17 08:24:59 +00:00
sessionparser.h start working on 0.7.x branch 2018-11-21 11:03:53 +00:00
slog.cpp moved winix directories to winixd subdirectory 2016-03-17 08:24:59 +00:00
slog.h start working on 0.7.x branch 2018-11-21 11:03:53 +00:00
synchro.cpp moved winix directories to winixd subdirectory 2016-03-17 08:24:59 +00:00
synchro.h moved winix directories to winixd subdirectory 2016-03-17 08:24:59 +00:00
system.cpp some work in the new api: 2018-11-21 22:53:24 +00:00
system.h start working on 0.7.x branch 2018-11-21 11:03:53 +00:00
textstream.h moved winix directories to winixd subdirectory 2016-03-17 08:24:59 +00:00
threadmanager.cpp fixed: clang address sanitizer reports that there is an use after free bug at the end when winix shuts down: 2021-02-17 15:58:05 +01:00
threadmanager.h updated to the new pikotools api - we have a logger for morm and ezc 2018-11-23 17:53:43 +00:00
timezone.cpp updated to the new Pikotools API 2018-01-06 18:12:53 +00:00
timezone.h moved winix directories to winixd subdirectory 2016-03-17 08:24:59 +00:00
timezones.cpp moved winix directories to winixd subdirectory 2016-03-17 08:24:59 +00:00
timezones.h start working on 0.7.x branch 2018-11-21 11:03:53 +00:00
ugcontainer.h start working on 0.7.x branch 2018-11-21 11:03:53 +00:00
user.cpp moved winix directories to winixd subdirectory 2016-03-17 08:24:59 +00:00
user.h moved winix directories to winixd subdirectory 2016-03-17 08:24:59 +00:00
users.cpp start working on 0.7.x branch 2018-11-21 11:03:53 +00:00
users.h start working on 0.7.x branch 2018-11-21 11:03:53 +00:00
version.h changed: version to 0.7.1 2021-01-25 13:14:16 +01:00
winix_const.h moved winix directories to winixd subdirectory 2016-03-17 08:24:59 +00:00
winixbase.cpp fixed: clang address sanitizer reports that there is an use after free bug at the end when winix shuts down: 2021-02-17 15:58:05 +01:00
winixbase.h fixed: clang address sanitizer reports that there is an use after free bug at the end when winix shuts down: 2021-02-17 15:58:05 +01:00
winixmodel.cpp some work in the new api: 2018-11-21 22:53:24 +00:00
winixmodel.h some work on dependency injection 2018-11-21 17:51:15 +00:00
winixrequest.cpp fixed: messages about password validity in adduser function were not shown, 2021-01-25 18:41:28 +01:00
winixrequest.h start working on 0.7.x branch 2018-11-21 11:03:53 +00:00
winixsystem.cpp some work on dependency injection 2018-11-21 17:51:15 +00:00
winixsystem.h start working on 0.7.x branch 2018-11-21 11:03:53 +00:00