SlideShare a Scribd company logo
1 of 25
Download to read offline
www.luxoft.com
Artem Melnytskyi
A Little About the
Bugs in the Code
www.luxoft.com
Coding
Coffee
Code review
About me
Code review
Coding
Coffee
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
Threadin
g bugs
Mutex
Deadlock
Data
Races
Race on a
bitfield
Race
During
Destructio
n VPTR:
constructio
n 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
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
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
Other Undefined Behavior
www.luxoft.com
THANK YOU!

More Related Content

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

Exploitation and State Machines
Exploitation and State MachinesExploitation and State Machines
Exploitation and State Machines
Michael Scovetta
 
Demystifying Visual Studio 2012 Performance Tools
Demystifying Visual Studio 2012 Performance ToolsDemystifying Visual Studio 2012 Performance Tools
Demystifying Visual Studio 2012 Performance Tools
Martin Kulov
 
T4T Training day - NodeJS
T4T Training day - NodeJST4T Training day - NodeJS
T4T Training day - NodeJS
Tim Sommer
 

Similar to Melnytskyi Artem "A Little About the Bugs in the Code" (20)

Exploitation and State Machines
Exploitation and State MachinesExploitation and State Machines
Exploitation and State Machines
 
Jvm tuning in a rush! - Lviv JUG
Jvm tuning in a rush! - Lviv JUGJvm tuning in a rush! - Lviv JUG
Jvm tuning in a rush! - Lviv JUG
 
Multithreading Fundamentals
Multithreading FundamentalsMultithreading Fundamentals
Multithreading Fundamentals
 
Don't Tell Joanna the Virtualized Rootkit is Dead (Blackhat 2007)
Don't Tell Joanna the Virtualized Rootkit is Dead (Blackhat 2007)Don't Tell Joanna the Virtualized Rootkit is Dead (Blackhat 2007)
Don't Tell Joanna the Virtualized Rootkit is Dead (Blackhat 2007)
 
Cryptanalysis in the Time of Ransomware
Cryptanalysis in the Time of RansomwareCryptanalysis in the Time of Ransomware
Cryptanalysis in the Time of Ransomware
 
Reverse Engineering the TomTom Runner pt. 1
Reverse Engineering the TomTom Runner pt. 1 Reverse Engineering the TomTom Runner pt. 1
Reverse Engineering the TomTom Runner pt. 1
 
Java tuning on GNU/Linux for busy dev
Java tuning on GNU/Linux for busy devJava tuning on GNU/Linux for busy dev
Java tuning on GNU/Linux for busy dev
 
Patching Windows Executables with the Backdoor Factory | DerbyCon 2013
Patching Windows Executables with the Backdoor Factory | DerbyCon 2013Patching Windows Executables with the Backdoor Factory | DerbyCon 2013
Patching Windows Executables with the Backdoor Factory | DerbyCon 2013
 
VXCON 2017
VXCON 2017VXCON 2017
VXCON 2017
 
Larson Macaulay apt_malware_past_present_future_out_of_band_techniques
Larson Macaulay apt_malware_past_present_future_out_of_band_techniquesLarson Macaulay apt_malware_past_present_future_out_of_band_techniques
Larson Macaulay apt_malware_past_present_future_out_of_band_techniques
 
Demystifying Visual Studio 2012 Performance Tools
Demystifying Visual Studio 2012 Performance ToolsDemystifying Visual Studio 2012 Performance Tools
Demystifying Visual Studio 2012 Performance Tools
 
Typhoon Managed Execution Toolkit
Typhoon Managed Execution ToolkitTyphoon Managed Execution Toolkit
Typhoon Managed Execution Toolkit
 
Micro control idsecconf2010
Micro control idsecconf2010Micro control idsecconf2010
Micro control idsecconf2010
 
0x003 - Exploiting LOLDrivers - Physical Memory Mayhem
0x003 - Exploiting LOLDrivers - Physical Memory Mayhem0x003 - Exploiting LOLDrivers - Physical Memory Mayhem
0x003 - Exploiting LOLDrivers - Physical Memory Mayhem
 
Geek out 2014-lagergren-final
Geek out 2014-lagergren-finalGeek out 2014-lagergren-final
Geek out 2014-lagergren-final
 
Scale CPU Experiences: Maximize Unity* Performance Using the Entity Component...
Scale CPU Experiences: Maximize Unity* Performance Using the Entity Component...Scale CPU Experiences: Maximize Unity* Performance Using the Entity Component...
Scale CPU Experiences: Maximize Unity* Performance Using the Entity Component...
 
.NET Core Summer event 2019 in Linz, AT - War stories from .NET team -- Karel...
.NET Core Summer event 2019 in Linz, AT - War stories from .NET team -- Karel....NET Core Summer event 2019 in Linz, AT - War stories from .NET team -- Karel...
.NET Core Summer event 2019 in Linz, AT - War stories from .NET team -- Karel...
 
Emulating With JavaScript
Emulating With JavaScriptEmulating With JavaScript
Emulating With JavaScript
 
T4T Training day - NodeJS
T4T Training day - NodeJST4T Training day - NodeJS
T4T Training day - NodeJS
 
Virtual Machine Introspection with Xen
Virtual Machine Introspection with XenVirtual Machine Introspection with Xen
Virtual Machine Introspection with Xen
 

More from LogeekNightUkraine

More from LogeekNightUkraine (20)

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

Recently uploaded

一比一原版(Cumbria毕业证书)英国坎布里亚大学毕业证成绩单学位证书
一比一原版(Cumbria毕业证书)英国坎布里亚大学毕业证成绩单学位证书一比一原版(Cumbria毕业证书)英国坎布里亚大学毕业证成绩单学位证书
一比一原版(Cumbria毕业证书)英国坎布里亚大学毕业证成绩单学位证书
AD
 
<><<><><=====@{Abortion pills}@==00971508021841}@={Available in Dubai}<><<><>...
<><<><><=====@{Abortion pills}@==00971508021841}@={Available in Dubai}<><<><>...<><<><><=====@{Abortion pills}@==00971508021841}@={Available in Dubai}<><<><>...
<><<><><=====@{Abortion pills}@==00971508021841}@={Available in Dubai}<><<><>...
abpmedicinedubai
 
一比一原版北雷克斯学院毕业证成绩单原件一模一样
一比一原版北雷克斯学院毕业证成绩单原件一模一样一比一原版北雷克斯学院毕业证成绩单原件一模一样
一比一原版北雷克斯学院毕业证成绩单原件一模一样
CC
 
一比一原版(UC毕业证书)加拿大卡尔加里大学毕业证成绩单原件一模一样
一比一原版(UC毕业证书)加拿大卡尔加里大学毕业证成绩单原件一模一样一比一原版(UC毕业证书)加拿大卡尔加里大学毕业证成绩单原件一模一样
一比一原版(UC毕业证书)加拿大卡尔加里大学毕业证成绩单原件一模一样
rgthdgf
 
原版制作麦考瑞大学毕业证成绩单原件一模一样
原版制作麦考瑞大学毕业证成绩单原件一模一样原版制作麦考瑞大学毕业证成绩单原件一模一样
原版制作麦考瑞大学毕业证成绩单原件一模一样
hbgfewda
 
如何办理澳洲南澳大学毕业证(UniSA毕业证书)成绩单本科学位证原版一比一
如何办理澳洲南澳大学毕业证(UniSA毕业证书)成绩单本科学位证原版一比一如何办理澳洲南澳大学毕业证(UniSA毕业证书)成绩单本科学位证原版一比一
如何办理澳洲南澳大学毕业证(UniSA毕业证书)成绩单本科学位证原版一比一
0uyfyq0q4
 
Battery Management System Functions (Flowchart of BMS Operations)
Battery Management System Functions (Flowchart of BMS Operations)Battery Management System Functions (Flowchart of BMS Operations)
Battery Management System Functions (Flowchart of BMS Operations)
Electric Vehicle Geek
 
原版制作(NUA毕业证书)英国诺里奇艺术大学毕业证成绩单原件一模一样
原版制作(NUA毕业证书)英国诺里奇艺术大学毕业证成绩单原件一模一样原版制作(NUA毕业证书)英国诺里奇艺术大学毕业证成绩单原件一模一样
原版制作(NUA毕业证书)英国诺里奇艺术大学毕业证成绩单原件一模一样
trthhgf
 
Toko Jual Viagra Asli Di Surabaya 081229400522 COD Obat Kuat Viagra
Toko Jual Viagra Asli Di Surabaya 081229400522 COD Obat Kuat ViagraToko Jual Viagra Asli Di Surabaya 081229400522 COD Obat Kuat Viagra
Toko Jual Viagra Asli Di Surabaya 081229400522 COD Obat Kuat Viagra
adet6151
 
一比一原版(Rutgers毕业证书)罗格斯大学毕业证成绩单原件一模一样
一比一原版(Rutgers毕业证书)罗格斯大学毕业证成绩单原件一模一样一比一原版(Rutgers毕业证书)罗格斯大学毕业证成绩单原件一模一样
一比一原版(Rutgers毕业证书)罗格斯大学毕业证成绩单原件一模一样
A
 
Solar Photovoltaic Plant Project Proposal by Slidesgo.pptx
Solar Photovoltaic Plant Project Proposal by Slidesgo.pptxSolar Photovoltaic Plant Project Proposal by Slidesgo.pptx
Solar Photovoltaic Plant Project Proposal by Slidesgo.pptx
AmarHaddad
 

Recently uploaded (20)

一比一原版(Cumbria毕业证书)英国坎布里亚大学毕业证成绩单学位证书
一比一原版(Cumbria毕业证书)英国坎布里亚大学毕业证成绩单学位证书一比一原版(Cumbria毕业证书)英国坎布里亚大学毕业证成绩单学位证书
一比一原版(Cumbria毕业证书)英国坎布里亚大学毕业证成绩单学位证书
 
<><<><><=====@{Abortion pills}@==00971508021841}@={Available in Dubai}<><<><>...
<><<><><=====@{Abortion pills}@==00971508021841}@={Available in Dubai}<><<><>...<><<><><=====@{Abortion pills}@==00971508021841}@={Available in Dubai}<><<><>...
<><<><><=====@{Abortion pills}@==00971508021841}@={Available in Dubai}<><<><>...
 
一比一原版北雷克斯学院毕业证成绩单原件一模一样
一比一原版北雷克斯学院毕业证成绩单原件一模一样一比一原版北雷克斯学院毕业证成绩单原件一模一样
一比一原版北雷克斯学院毕业证成绩单原件一模一样
 
Introduction to UDS over CAN | UDS Service
Introduction to UDS over CAN | UDS ServiceIntroduction to UDS over CAN | UDS Service
Introduction to UDS over CAN | UDS Service
 
一比一原版(UC毕业证书)加拿大卡尔加里大学毕业证成绩单原件一模一样
一比一原版(UC毕业证书)加拿大卡尔加里大学毕业证成绩单原件一模一样一比一原版(UC毕业证书)加拿大卡尔加里大学毕业证成绩单原件一模一样
一比一原版(UC毕业证书)加拿大卡尔加里大学毕业证成绩单原件一模一样
 
原版制作麦考瑞大学毕业证成绩单原件一模一样
原版制作麦考瑞大学毕业证成绩单原件一模一样原版制作麦考瑞大学毕业证成绩单原件一模一样
原版制作麦考瑞大学毕业证成绩单原件一模一样
 
如何办理澳洲南澳大学毕业证(UniSA毕业证书)成绩单本科学位证原版一比一
如何办理澳洲南澳大学毕业证(UniSA毕业证书)成绩单本科学位证原版一比一如何办理澳洲南澳大学毕业证(UniSA毕业证书)成绩单本科学位证原版一比一
如何办理澳洲南澳大学毕业证(UniSA毕业证书)成绩单本科学位证原版一比一
 
Battery Management System Functions (Flowchart of BMS Operations)
Battery Management System Functions (Flowchart of BMS Operations)Battery Management System Functions (Flowchart of BMS Operations)
Battery Management System Functions (Flowchart of BMS Operations)
 
CAMIONES TOYOTA N04C- Engine y HINO 300.
CAMIONES TOYOTA N04C- Engine y HINO 300.CAMIONES TOYOTA N04C- Engine y HINO 300.
CAMIONES TOYOTA N04C- Engine y HINO 300.
 
-VDA-Special-Characteristics Special characteristics.pdf
-VDA-Special-Characteristics Special characteristics.pdf-VDA-Special-Characteristics Special characteristics.pdf
-VDA-Special-Characteristics Special characteristics.pdf
 
原版制作(NUA毕业证书)英国诺里奇艺术大学毕业证成绩单原件一模一样
原版制作(NUA毕业证书)英国诺里奇艺术大学毕业证成绩单原件一模一样原版制作(NUA毕业证书)英国诺里奇艺术大学毕业证成绩单原件一模一样
原版制作(NUA毕业证书)英国诺里奇艺术大学毕业证成绩单原件一模一样
 
Battery Management System Circuit Diagram.pdf
Battery Management System Circuit Diagram.pdfBattery Management System Circuit Diagram.pdf
Battery Management System Circuit Diagram.pdf
 
Basic of Firmware & Embedded Software Programming in C
Basic of Firmware & Embedded Software Programming in CBasic of Firmware & Embedded Software Programming in C
Basic of Firmware & Embedded Software Programming in C
 
Toko Jual Viagra Asli Di Surabaya 081229400522 COD Obat Kuat Viagra
Toko Jual Viagra Asli Di Surabaya 081229400522 COD Obat Kuat ViagraToko Jual Viagra Asli Di Surabaya 081229400522 COD Obat Kuat Viagra
Toko Jual Viagra Asli Di Surabaya 081229400522 COD Obat Kuat Viagra
 
Timer Handling in UDS | S3 Server Timer | P2 and P2 Start Timer
Timer Handling in UDS | S3 Server Timer | P2 and P2 Start TimerTimer Handling in UDS | S3 Server Timer | P2 and P2 Start Timer
Timer Handling in UDS | S3 Server Timer | P2 and P2 Start Timer
 
ℂall Girls Chirag Delhi ℂall Now Chhaya ☎ 9899900591 WhatsApp Number 24/7
ℂall Girls Chirag Delhi ℂall Now Chhaya ☎ 9899900591 WhatsApp  Number 24/7ℂall Girls Chirag Delhi ℂall Now Chhaya ☎ 9899900591 WhatsApp  Number 24/7
ℂall Girls Chirag Delhi ℂall Now Chhaya ☎ 9899900591 WhatsApp Number 24/7
 
Toyota Yaris service manual Free.pdf Toyota Yaris Service manual
Toyota Yaris service manual Free.pdf  Toyota Yaris Service manualToyota Yaris service manual Free.pdf  Toyota Yaris Service manual
Toyota Yaris service manual Free.pdf Toyota Yaris Service manual
 
Torque converter In automobile engineering
Torque converter In automobile engineeringTorque converter In automobile engineering
Torque converter In automobile engineering
 
一比一原版(Rutgers毕业证书)罗格斯大学毕业证成绩单原件一模一样
一比一原版(Rutgers毕业证书)罗格斯大学毕业证成绩单原件一模一样一比一原版(Rutgers毕业证书)罗格斯大学毕业证成绩单原件一模一样
一比一原版(Rutgers毕业证书)罗格斯大学毕业证成绩单原件一模一样
 
Solar Photovoltaic Plant Project Proposal by Slidesgo.pptx
Solar Photovoltaic Plant Project Proposal by Slidesgo.pptxSolar Photovoltaic Plant Project Proposal by Slidesgo.pptx
Solar Photovoltaic Plant Project Proposal by Slidesgo.pptx
 

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