daryaevd / osi_threads Goto Github PK
View Code? Open in Web Editor NEW2nd sem of osi
2nd sem of osi
Потенциальный двойной вызов free
double free or corruption (out)
zsh: IOT instruction (core dumped)
(gdb) where
...
#9 0x000056334fd45a52 in handleRequestConnection (args=0x56334ff7ca70) at proxy.c:168
#10 0x00007ff0cd6199eb in start_thread (arg=<optimized out>) at pthread_create.c:444
#11 0x00007ff0cd69d7cc in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78
Освобождение памяти происходит не при всех вариантах/не во всех ветках исполнения программы
Нужно вынести библиотеку в отдельный файл и не смешивать ее с частным примером ее использования (main)
Кажется, exit - довольно странный способ сообщить об ошибке в библиотеке
usleep(1) - довольно маленький интервал, процессор будет слишком много раз вхолостую обращать внимание на процесс
if (pthread_mutex_unlock(&q->mutex)) {
printf("pthread_mutex_unlock() error\n");
}
общий код (типа такого) нужно вынести в отдельный метод
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.