www.luxoft.com
Artem Melnytskyi
A Little About the
Bugs in the Code
www.luxoft.com
Coding
Coffee
Code review
About me
Coffee
Coding
Code
review
www.luxoft.com
It’s about
• Bug classification
• Memory access bugs
• Threading bugs
• Undefined behavior bug
www.luxoft.com
Before the beginning…
• Nothing here claims to be the truth in the last instance.
• Yes, I know that on another compiler, and another platform (on which you were lucky
enough to work) this may not be so.
www.luxoft.com
Memory access
bugs
Buffer
overflow
Erroneous
type cast
Use-after-
free
Use-after-
return
Use-after-
scope
[De]allocation
bugs
Memory
leaks
Use of
uninitialized
memory
Threading
bugs
Mutex
Deadlock
Data
Races
Race on a
bitfield
Race During
Destruction
VPTR:
construction
order
Race on
VPTR
Race on VPTR
(cont)
Atomicity
violation
Atomicity violation
(cont)
Other
Undefined
Behavior
Init Order
Fiasco
ODR (one
definition rule)
Violation
Lack of
Sequence Point
Integer
Overflow
Bug classification
www.luxoft.com
www.luxoft.com
bug
in GCC
Memory access bugs
www.luxoft.com
bug
in GCC
Memory access bugs
www.luxoft.com
bug
in GCC
Memory access bugs
www.luxoft.com
bug
in GCC
Memory access bugs
www.luxoft.com
Алло RAIIчка, ты сейчас упадешь!
Memory access bugs
www.luxoft.com
Memory access bugs
www.luxoft.com
Memory access bugs
www.luxoft.com
https://www.viva64.com/en/a/0079/
100 Bugs in Open Source C/C++ projects
www.luxoft.com
Memory access bugs
www.luxoft.com
Threading bugs
www.luxoft.com
Threading bugs
www.luxoft.com
Threading bugs
www.luxoft.com
Threading bugs
www.luxoft.com
Continue...
www.luxoft.com
www.luxoft.com
VPTR RACE
www.luxoft.com
Init Order
Fiasco
Other Undefined Behavior
www.luxoft.com
Other Undefined Behavior
www.luxoft.com
THANK YOU!

More Related Content

PDF
Melnytskyi Artem "A Little About the Bugs in the Code"
PDF
Code retreat @BMW Car IT
PDF
Code Retreat
PDF
ElixirConf 2017 - Writing an Editor in Elixir - Ian Duggan
PDF
vimshell made other shells legacy
PDF
20140531 serebryany lecture01_fantastic_cpp_bugs
PDF
20140531 serebryany lecture01_fantastic_cpp_bugs
PPTX
PVS-Studio. Static code analyzer. Windows/Linux, C/C++/C#. 2017
Melnytskyi Artem "A Little About the Bugs in the Code"
Code retreat @BMW Car IT
Code Retreat
ElixirConf 2017 - Writing an Editor in Elixir - Ian Duggan
vimshell made other shells legacy
20140531 serebryany lecture01_fantastic_cpp_bugs
20140531 serebryany lecture01_fantastic_cpp_bugs
PVS-Studio. Static code analyzer. Windows/Linux, C/C++/C#. 2017

More from LogeekNightUkraine (20)

PPTX
Face recognition with c++
PPTX
C++20 features
PPTX
Autonomous driving on your developer pc. technologies, approaches, future
PDF
Orkhan Gasimov "High Performance System Design"
PPTX
Vitalii Korzh "Managed Workflows or How to Master Data"
PDF
Yevhen Tatarynov "From POC to High-Performance .NET applications"
PDF
Oleksii Kuchuk "Reading gauge values with open cv imgproc"
PDF
Oleksandr Kutsan "Using katai struct to describe the process of working with ...
PDF
Pavlo Zhdanov "Mastering solid and base principles for software design"
PDF
Serhii Zemlianyi "Error Retries with Exponential Backoff Using RabbitMQ"
PDF
Iurii Antykhovych "Java and performance tools and toys"
PDF
Eugene Bova "Dapr (Distributed Application Runtime) in a Microservices Archit...
PPTX
Aleksandr Kutsan "Managing Dependencies in C++"
PDF
Yevhen Tatarynov "My .NET Application Allocates too Much Memory. What Can I Do?"
PDF
Alexandr Golyak, Nikolay Chertkov "Automotive Testing vs Test Automatio"
PPTX
Michal Kordas "Docker: Good, Bad or Both"
PPTX
Kolomiyets Dmytro "Dealing with Multiple Caches, When Developing Microservices"
PPTX
Shestakov Illia "The Sandbox Theory"
PPTX
Dmytro Kochergin “Autotest with CYPRESS”
PPTX
Ivan Dryzhyruk “Ducks Don’t Like Bugs”
Face recognition with c++
C++20 features
Autonomous driving on your developer pc. technologies, approaches, future
Orkhan Gasimov "High Performance System Design"
Vitalii Korzh "Managed Workflows or How to Master Data"
Yevhen Tatarynov "From POC to High-Performance .NET applications"
Oleksii Kuchuk "Reading gauge values with open cv imgproc"
Oleksandr Kutsan "Using katai struct to describe the process of working with ...
Pavlo Zhdanov "Mastering solid and base principles for software design"
Serhii Zemlianyi "Error Retries with Exponential Backoff Using RabbitMQ"
Iurii Antykhovych "Java and performance tools and toys"
Eugene Bova "Dapr (Distributed Application Runtime) in a Microservices Archit...
Aleksandr Kutsan "Managing Dependencies in C++"
Yevhen Tatarynov "My .NET Application Allocates too Much Memory. What Can I Do?"
Alexandr Golyak, Nikolay Chertkov "Automotive Testing vs Test Automatio"
Michal Kordas "Docker: Good, Bad or Both"
Kolomiyets Dmytro "Dealing with Multiple Caches, When Developing Microservices"
Shestakov Illia "The Sandbox Theory"
Dmytro Kochergin “Autotest with CYPRESS”
Ivan Dryzhyruk “Ducks Don’t Like Bugs”
Ad

Recently uploaded (20)

PPT
Main/Core Business Application User Manual
PPTX
Training Material_Verification Station.pptx
PDF
MES Chapter 3 Combined UNIVERSITY OF VISVESHWARAYA
PDF
Compact Excavator Volvo EC55 Service Repair Manual.pdf
PPTX
Constitutional Design PPT.pptxl from social science class IX
PDF
Volvo EC55 Compact Excavator Service Repair Manual Instant Download.pdf
PPTX
729193dbwbsve251-Calabarzon-Ppt-Copy.pptx
PDF
Lubrication system for Automotive technologies
PDF
Pharmacy is a goood college yvucc7t7tvy7tv7t
PDF
harrier-ev-brochure___________________.pdf
PDF
Governor Volvo EC55 Service Repair Manual.pdf
PPTX
Moral Theology (PREhhhhhhhhhhhhhhhhhhhhhLIMS) (1).pptx
PPTX
Victory precisions_Die casting foundry_.pptx
PDF
book-slidefsdljflsk fdslkfjslf sflgs.pdf
PDF
Dongguan Sunnew ESS Profile for the year of 2023
PDF
John Deere 460E II Articulated Dump Truck Service Manual.pdf
PDF
TM1611 John Deere 410E service Repair Manual.pdf
PDF
Fuel injection pump Volvo EC55 Repair Manual.pdf
PDF
Cylinder head Volvo EC55 Service Repair Manual.pdf
PDF
eti_09_TestPrecedurebdciwbwib wdjkcwnowe wdnwdw
Main/Core Business Application User Manual
Training Material_Verification Station.pptx
MES Chapter 3 Combined UNIVERSITY OF VISVESHWARAYA
Compact Excavator Volvo EC55 Service Repair Manual.pdf
Constitutional Design PPT.pptxl from social science class IX
Volvo EC55 Compact Excavator Service Repair Manual Instant Download.pdf
729193dbwbsve251-Calabarzon-Ppt-Copy.pptx
Lubrication system for Automotive technologies
Pharmacy is a goood college yvucc7t7tvy7tv7t
harrier-ev-brochure___________________.pdf
Governor Volvo EC55 Service Repair Manual.pdf
Moral Theology (PREhhhhhhhhhhhhhhhhhhhhhLIMS) (1).pptx
Victory precisions_Die casting foundry_.pptx
book-slidefsdljflsk fdslkfjslf sflgs.pdf
Dongguan Sunnew ESS Profile for the year of 2023
John Deere 460E II Articulated Dump Truck Service Manual.pdf
TM1611 John Deere 410E service Repair Manual.pdf
Fuel injection pump Volvo EC55 Repair Manual.pdf
Cylinder head Volvo EC55 Service Repair Manual.pdf
eti_09_TestPrecedurebdciwbwib wdjkcwnowe wdnwdw
Ad

Melnytskyi Artem "A Little About the Bugs in the Code"