The document discusses the semantics of final fields in Java. It provides examples of how final fields can prevent unsafe behavior in multithreaded applications by preventing race conditions on shared mutable objects. It also describes how final helps avoid issues seen in early versions of Java by preventing references to uninitialized objects. The specification allows compilers to reorder and optimize code in complex ways while still preserving the partial order of operations defined by final fields and other semantics.
Final keyword in java is known to forbid class extension and modification of the fields. It is less known to have special meaning in multithreaded code.
Unfortunately, there is not that much information on the latter, and even most thorough talks avoid deep details on the beauty of finals.
In this talk I apply section 17.5 of java language specification to different examples and show how the spec works. Several myths are busted on the way.
Here's nice article on different aspects of JMM: http://shipilev.net/blog/2014/jmm-pragmatics/
The document discusses high performance JDBC and database optimization. It covers topics like persistence frameworks, JDBC drivers and connections, query performance, and tuning database and application design. Specific tips mentioned include using prepared statements, setting fetch sizes, closing resources, and leveraging database features like indexes and materialized views.
Доклад читался на http://university.jokerconf.com/. Целевая аудитория -- начинающие программисты.
У enterprise-приложений много общих подводных камней, которые подстерегают на пути к выводу систему в эксплуатацию.
Что делать, если через неделю после выхода в production система начала тормозить? Что делать, если проблема воспроизводится только у заказчика?
В докладе рассмотрим частые случаи, приводящие к полной или частичной недоступности production-системы. Научимся обходить стороной грабли и поднимать их до того, как на них кто-то наступит.
A step-by-step approach toward high quality OutOfMemoryError analysisVladimir Sitnikov
Все говорят, что при проблемах с памятью нужно открыть Eclipse MemoryAnalyzer и немного покрутить. Да, часто это срабатывает, но бывает, что даже опытного инженера задача ставит в тупик.
В докладе мы рассмотрим примеры коварных OOM, и научимся анализировать причины их возникновения. На живых мертвецах дампах памяти увидим почему может не очищаться WeakHashMap, куда утекает native память, сколько finalizer'ов поместится на кончике иглы.
Полученные знания позволят вам уверенно разбирать дампы памяти и избегать шаблонов кода, приводящих к утечкам.
http://jeeconf.com/program/a-step-by-step-approach-toward-high-quality-outofmemoryerror-analysis/
В этом докладе рассмотрен опыт NetCracker по выбору инструмента для изучения причин проблем производительности.
Рассмотрены критерии по которым не подошли имеющиеся инструменты и показаны примеры того, чего не хватает при анализе результатов обычными профайлерами.
http://jeeconf.com/program/implement-your-own-profiler-with-blackjack-and-fun/
This document summarizes a presentation about optimizing performance between PostgreSQL and JDBC.
The presenter discusses several strategies for improving query performance such as using prepared statements, avoiding closing statements, setting fetch sizes appropriately, and using batch inserts with COPY for large amounts of data. Some potential issues that can cause performance degradation are also covered, such as parameter type changes invalidating prepared statements and unexpected plan changes after repeated executions.
The presentation includes examples and benchmarks demonstrating the performance impact of different approaches. The overall message is that prepared statements are very important for performance but must be used carefully due to edge cases that can still cause issues.
Общедоступные программы и библиотеки подкупают своей бесплатностью. Если же исходный код открыт, то все сразу думают, что «умные дядьки уже исправили всё, что нужно». На практике же оказывается, что грабли разложены там, где их мало кто ждёт. Тормозит всё, кроме, разве что, самой java. В докладе мы рассмотрим примеры проблем производительности при использовании таких библиотек как Wildfly, Spring, HornetQ, pgjdbc.
Например, оказывается, что spring.getBean тормозит, а в комбинации с autoproxy вообще может занимать до 50% времени приложения. Cglib мешает работе garbage collector’а в попытках проксировать Object#finalize, а HornetQ внезапно притормаживает отправку JMS, что запросто приводит к 5-и секундным задержкам на одно сообщение. Узнаем как их опознать и обезвредить.
http://javapoint.ru/talks/sitnikov/
Все говорят, что для максимальной производительности работы из Java с базой данных нужно использовать PreparedStatements и Batch DML. Практика показывает, что нельзя слепо идти на поводу у прописных истин. Нужно понимать особенности конкретной базы и характера передаваемых данных.
В докладе мы рассмотрим то, как эффективное использование протокола PostgreSQL позволяет добиться высокой производительности при выборке и сохранении данных. На примерах увидим как простые изменения в коде приложения и JDBC драйвера на порядок ускоряют запросы. Мы увидим как задействовать механизм server prepared statements из клиенсткого кода и узнаем его узкие места. Обсудим средства эффективной передачи данных в базу.
Многие обсуждаемые доработки недавно вошли в состав официального JDBC драйвера. Доклад будет полезен не только Java программистам, т.к. многие подводные грабли вытекают из самого протокола общения PostgreSQL с внешним миром.
Final keyword in java is known to forbid class extension and modification of the fields. It is less known to have special meaning in multithreaded code.
Unfortunately, there is not that much information on the latter, and even most thorough talks avoid deep details on the beauty of finals.
In this talk I apply section 17.5 of java language specification to different examples and show how the spec works. Several myths are busted on the way.
Here's nice article on different aspects of JMM: http://shipilev.net/blog/2014/jmm-pragmatics/
The document discusses high performance JDBC and database optimization. It covers topics like persistence frameworks, JDBC drivers and connections, query performance, and tuning database and application design. Specific tips mentioned include using prepared statements, setting fetch sizes, closing resources, and leveraging database features like indexes and materialized views.
Доклад читался на http://university.jokerconf.com/. Целевая аудитория -- начинающие программисты.
У enterprise-приложений много общих подводных камней, которые подстерегают на пути к выводу систему в эксплуатацию.
Что делать, если через неделю после выхода в production система начала тормозить? Что делать, если проблема воспроизводится только у заказчика?
В докладе рассмотрим частые случаи, приводящие к полной или частичной недоступности production-системы. Научимся обходить стороной грабли и поднимать их до того, как на них кто-то наступит.
A step-by-step approach toward high quality OutOfMemoryError analysisVladimir Sitnikov
Все говорят, что при проблемах с памятью нужно открыть Eclipse MemoryAnalyzer и немного покрутить. Да, часто это срабатывает, но бывает, что даже опытного инженера задача ставит в тупик.
В докладе мы рассмотрим примеры коварных OOM, и научимся анализировать причины их возникновения. На живых мертвецах дампах памяти увидим почему может не очищаться WeakHashMap, куда утекает native память, сколько finalizer'ов поместится на кончике иглы.
Полученные знания позволят вам уверенно разбирать дампы памяти и избегать шаблонов кода, приводящих к утечкам.
http://jeeconf.com/program/a-step-by-step-approach-toward-high-quality-outofmemoryerror-analysis/
В этом докладе рассмотрен опыт NetCracker по выбору инструмента для изучения причин проблем производительности.
Рассмотрены критерии по которым не подошли имеющиеся инструменты и показаны примеры того, чего не хватает при анализе результатов обычными профайлерами.
http://jeeconf.com/program/implement-your-own-profiler-with-blackjack-and-fun/
This document summarizes a presentation about optimizing performance between PostgreSQL and JDBC.
The presenter discusses several strategies for improving query performance such as using prepared statements, avoiding closing statements, setting fetch sizes appropriately, and using batch inserts with COPY for large amounts of data. Some potential issues that can cause performance degradation are also covered, such as parameter type changes invalidating prepared statements and unexpected plan changes after repeated executions.
The presentation includes examples and benchmarks demonstrating the performance impact of different approaches. The overall message is that prepared statements are very important for performance but must be used carefully due to edge cases that can still cause issues.
Общедоступные программы и библиотеки подкупают своей бесплатностью. Если же исходный код открыт, то все сразу думают, что «умные дядьки уже исправили всё, что нужно». На практике же оказывается, что грабли разложены там, где их мало кто ждёт. Тормозит всё, кроме, разве что, самой java. В докладе мы рассмотрим примеры проблем производительности при использовании таких библиотек как Wildfly, Spring, HornetQ, pgjdbc.
Например, оказывается, что spring.getBean тормозит, а в комбинации с autoproxy вообще может занимать до 50% времени приложения. Cglib мешает работе garbage collector’а в попытках проксировать Object#finalize, а HornetQ внезапно притормаживает отправку JMS, что запросто приводит к 5-и секундным задержкам на одно сообщение. Узнаем как их опознать и обезвредить.
http://javapoint.ru/talks/sitnikov/
Все говорят, что для максимальной производительности работы из Java с базой данных нужно использовать PreparedStatements и Batch DML. Практика показывает, что нельзя слепо идти на поводу у прописных истин. Нужно понимать особенности конкретной базы и характера передаваемых данных.
В докладе мы рассмотрим то, как эффективное использование протокола PostgreSQL позволяет добиться высокой производительности при выборке и сохранении данных. На примерах увидим как простые изменения в коде приложения и JDBC драйвера на порядок ускоряют запросы. Мы увидим как задействовать механизм server prepared statements из клиенсткого кода и узнаем его узкие места. Обсудим средства эффективной передачи данных в базу.
Многие обсуждаемые доработки недавно вошли в состав официального JDBC драйвера. Доклад будет полезен не только Java программистам, т.к. многие подводные грабли вытекают из самого протокола общения PostgreSQL с внешним миром.
This document discusses the organization of a computer system. It describes how a bootstrap program stored in ROM is used to load the operating system at startup. The computer system consists of a CPU, memory, and I/O devices connected by a common bus. Memory is divided into primary storage like RAM and secondary storage like hard disks for permanent storage. The CPU executes instructions by fetching them from memory and can be interrupted to service events from hardware or software.
Triển khai Modsecurity vào hệ thống NMS - Quan Minh TâmSecurity Bootcamp
The document discusses various techniques for web application security and traffic analysis using ModSecurity, including real-time application profiling, hacker traps, anomaly scoring, correlation of inbound and outbound events, detecting malicious links, unicode normalization, abnormal header ordering, detecting page title changes, device fingerprinting, and slowing down automated attacks. It also mentions using ELK (Elasticsearch, Logstash, Kibana) for real-time analysis of streaming log data.
This document discusses microcontrollers and the Internet of Things (IoT). It provides an overview of IoT basics including common hardware platforms, connectivity options, and energy sources. It also presents several example IoT usage scenarios such as data aggregation and presentation, real-time home automation, and invoking web services. Code examples are provided for collecting sensor data with Arduino and Plotly and controlling devices remotely via a web interface on an ESP8266 microcontroller.
This document describes MPEG-V Sensory Information (SI), also known as RoSE WD v3.0. It discusses the scope and structure of the standard, which aims to describe sensory effects and map them to device capabilities to trigger human senses. The standard includes a sensory effect description language, vocabulary, and context descriptions. It is being developed by an ad-hoc group and referenced in other MPEG requirements and standards documents.
The document discusses building human-based software estimation models that are accurate, intuitive, and easy to understand. It presents an approach using correlation and scale factors between estimated and actual effort. Experiments on a dataset of 178 samples show that combining correlation and scale factors into a decision tree achieves up to 93.3% accuracy. The resulting model bridges expert and algorithmic estimation methods.
Cisco Connect Toronto 2018 sixty to zeroCisco Canada
The document discusses automating security tasks through various solutions from Cisco. It introduces the Cisco Advanced Malware Protection (AMP) solution, which uses machine learning to detect known and unknown malware across endpoints, networks, and email. It also introduces Cisco Cognitive Threat Analytics, which analyzes web traffic using machine learning to detect anomalous and malicious activity inside organizations. The document provides examples of how these solutions can automate tasks like hunting for threats, detecting anomalies, and attributing suspicious activity to specific entities. It includes demos of the AMP and Cognitive Intelligence user interfaces.
DEF CON 27 - MICHAEL LEIBOWITZ and TOPHER TIMZEN - edr is coming hide yo shtFelipe Prado
The document discusses how Enterprise Detection and Response (EDR) tools are becoming more prevalent and how they can be evaded by hiding payloads in UEFI firmware variables on Windows and Linux systems. On Windows, a C# program uses reflection to overwrite method pointers and execute code hidden in a UEFI variable in order to avoid detection. On Linux, ptrace is used to intercept system calls and modify them to create memory mappings and execute code without EDR detection. The document provides code examples and step-by-step instructions for hiding payloads from EDR on both platforms using UEFI variables and system call interception.
Cisco Connect Ottawa 2018 sixty to zeroCisco Canada
The document discusses automating security tasks through various solutions from Cisco like AMP for Endpoints and Cognitive Intelligence. It introduces the F3EAD model for threat hunting which stands for Find, Fix, Finish, Exploit, Analyze, Disseminate. Various automation use cases are demonstrated like hunting for threats, anomalies, and exploit attempts. Cisco products like AMP and Cognitive Intelligence use techniques such as anomaly detection, trust modeling, event classification, entity modeling, and relationship modeling to automate security tasks.
Building Pageless Apps with Rails and Backbone.jsZURB
The bulk of the presentation will be presenting Backbone.js and walking through each of the steps to create a pageless app using Backbone.js and Rails. With each step the design and interaction decisions will be explained, and what not to do with pageless apps will be illustrated.
Latin America Tour 2019 - slow data and sql processingConnor McDonald
The document discusses techniques for improving SQL performance by reducing parsing overhead. It describes how the library cache can store the results of previous SQL parses to avoid reparsing identical or similar statements. Binding SQL statements with placeholders avoids unnecessary reparsing when statements differ only by literal values. The document emphasizes that binding user input values is critical for security to prevent SQL injection attacks.
The document discusses practical incident response in heterogeneous environments and overcoming limitations of traditional approaches. It proposes utilizing intelligence-driven investigation and actionable IOCs to more flexibly shape the triage process across different operating systems. Examples are provided of using software fingerprinting and debugging symbols to attribute malware and build structured knowledge bases of attackers.
Learning to Rank Relevant Malware Strings Using Weak SupervisionPhil Tully
This document provides an overview of the StringSifter tool, which uses machine learning techniques to analyze and prioritize strings extracted from binaries. StringSifter was developed by FireEye to help analysts more efficiently identify the most relevant strings for malware analysis. It uses weak supervision and learning to rank models to assign priority scores to strings based on features like entropy rates and regular expressions. This allows analysts to focus on the highest priority strings first. The document describes the development of the EMBER dataset used to train and evaluate StringSifter, the labeling functions used for weak supervision, and the machine learning models employed, including gradient boosted decision trees and neural networks. Evaluation shows StringSifter performs well on a holdout set of
Nowadays, CPU microarchitecture is concealed from developers by compilers, VMs, etc.
Do Java developers need to know microarchitecture details of modern processors?
Or, does it like to learn quantum mechanics for cooking?
Are Java developers safe from leaking low-level microarchitecture details into high level application performance behaviour?
We will try to answer these questions by analyzing several Java examples.
The document discusses a presentation about Certified Ethical Hacking. It begins by asking if computer hacking can be ethical and if one can be certified in it. It then explains that ethical hacking involves using hacking skills to test an organization's security defenses for vulnerabilities, with the organization's authorization. The rest of the document outlines the Certified Ethical Hacking certification program, including what is covered in the training course and exam. It provides examples of hacking tools and techniques taught as well as sample exam questions. The presentation emphasizes that ethical hacking is just one part of managing security risks and that there is no single solution to security issues.
Codeception Testing Framework -- English #phpkansaiFlorent Batard
The document discusses introducing Codeception, a PHP testing framework. It begins with an agenda that includes a presentation on Codeception, different test types, a demonstration, and best practices. It then introduces the speaker, Florent Batard, who is a security engineer and web developer from France. He explains why testing is important for reducing assumptions and validating that code runs as expected. The bulk of the document then focuses on Codeception, explaining what it is, how it works, the different types of tests it supports including acceptance, functional, and unit tests, and how to install and use it. Code examples are provided and it concludes with referencing materials and opening the floor for questions.
The document discusses the Leap Motion Controller and Myo gesture control devices. It provides an overview of their technical specifications including tracking accuracy, supported languages, data models, and examples of applications. It also shares some of the author's insights on designing gesture-based applications.
How to develop web APIs in PHP using the popular Zend Expressive framework. This webinar focuses on the REST API using the HAL-JSON format, the Problem Details format for error handling, and authentication using OAuth2.
Odoo ERP software
Odoo ERP software, a leading open-source software for Enterprise Resource Planning (ERP) and business management, has recently launched its latest version, Odoo 17 Community Edition. This update introduces a range of new features and enhancements designed to streamline business operations and support growth.
The Odoo Community serves as a cost-free edition within the Odoo suite of ERP systems. Tailored to accommodate the standard needs of business operations, it provides a robust platform suitable for organisations of different sizes and business sectors. Within the Odoo Community Edition, users can access a variety of essential features and services essential for managing day-to-day tasks efficiently.
This blog presents a detailed overview of the features available within the Odoo 17 Community edition, and the differences between Odoo 17 community and enterprise editions, aiming to equip you with the necessary information to make an informed decision about its suitability for your business.
This document discusses the organization of a computer system. It describes how a bootstrap program stored in ROM is used to load the operating system at startup. The computer system consists of a CPU, memory, and I/O devices connected by a common bus. Memory is divided into primary storage like RAM and secondary storage like hard disks for permanent storage. The CPU executes instructions by fetching them from memory and can be interrupted to service events from hardware or software.
Triển khai Modsecurity vào hệ thống NMS - Quan Minh TâmSecurity Bootcamp
The document discusses various techniques for web application security and traffic analysis using ModSecurity, including real-time application profiling, hacker traps, anomaly scoring, correlation of inbound and outbound events, detecting malicious links, unicode normalization, abnormal header ordering, detecting page title changes, device fingerprinting, and slowing down automated attacks. It also mentions using ELK (Elasticsearch, Logstash, Kibana) for real-time analysis of streaming log data.
This document discusses microcontrollers and the Internet of Things (IoT). It provides an overview of IoT basics including common hardware platforms, connectivity options, and energy sources. It also presents several example IoT usage scenarios such as data aggregation and presentation, real-time home automation, and invoking web services. Code examples are provided for collecting sensor data with Arduino and Plotly and controlling devices remotely via a web interface on an ESP8266 microcontroller.
This document describes MPEG-V Sensory Information (SI), also known as RoSE WD v3.0. It discusses the scope and structure of the standard, which aims to describe sensory effects and map them to device capabilities to trigger human senses. The standard includes a sensory effect description language, vocabulary, and context descriptions. It is being developed by an ad-hoc group and referenced in other MPEG requirements and standards documents.
The document discusses building human-based software estimation models that are accurate, intuitive, and easy to understand. It presents an approach using correlation and scale factors between estimated and actual effort. Experiments on a dataset of 178 samples show that combining correlation and scale factors into a decision tree achieves up to 93.3% accuracy. The resulting model bridges expert and algorithmic estimation methods.
Cisco Connect Toronto 2018 sixty to zeroCisco Canada
The document discusses automating security tasks through various solutions from Cisco. It introduces the Cisco Advanced Malware Protection (AMP) solution, which uses machine learning to detect known and unknown malware across endpoints, networks, and email. It also introduces Cisco Cognitive Threat Analytics, which analyzes web traffic using machine learning to detect anomalous and malicious activity inside organizations. The document provides examples of how these solutions can automate tasks like hunting for threats, detecting anomalies, and attributing suspicious activity to specific entities. It includes demos of the AMP and Cognitive Intelligence user interfaces.
DEF CON 27 - MICHAEL LEIBOWITZ and TOPHER TIMZEN - edr is coming hide yo shtFelipe Prado
The document discusses how Enterprise Detection and Response (EDR) tools are becoming more prevalent and how they can be evaded by hiding payloads in UEFI firmware variables on Windows and Linux systems. On Windows, a C# program uses reflection to overwrite method pointers and execute code hidden in a UEFI variable in order to avoid detection. On Linux, ptrace is used to intercept system calls and modify them to create memory mappings and execute code without EDR detection. The document provides code examples and step-by-step instructions for hiding payloads from EDR on both platforms using UEFI variables and system call interception.
Cisco Connect Ottawa 2018 sixty to zeroCisco Canada
The document discusses automating security tasks through various solutions from Cisco like AMP for Endpoints and Cognitive Intelligence. It introduces the F3EAD model for threat hunting which stands for Find, Fix, Finish, Exploit, Analyze, Disseminate. Various automation use cases are demonstrated like hunting for threats, anomalies, and exploit attempts. Cisco products like AMP and Cognitive Intelligence use techniques such as anomaly detection, trust modeling, event classification, entity modeling, and relationship modeling to automate security tasks.
Building Pageless Apps with Rails and Backbone.jsZURB
The bulk of the presentation will be presenting Backbone.js and walking through each of the steps to create a pageless app using Backbone.js and Rails. With each step the design and interaction decisions will be explained, and what not to do with pageless apps will be illustrated.
Latin America Tour 2019 - slow data and sql processingConnor McDonald
The document discusses techniques for improving SQL performance by reducing parsing overhead. It describes how the library cache can store the results of previous SQL parses to avoid reparsing identical or similar statements. Binding SQL statements with placeholders avoids unnecessary reparsing when statements differ only by literal values. The document emphasizes that binding user input values is critical for security to prevent SQL injection attacks.
The document discusses practical incident response in heterogeneous environments and overcoming limitations of traditional approaches. It proposes utilizing intelligence-driven investigation and actionable IOCs to more flexibly shape the triage process across different operating systems. Examples are provided of using software fingerprinting and debugging symbols to attribute malware and build structured knowledge bases of attackers.
Learning to Rank Relevant Malware Strings Using Weak SupervisionPhil Tully
This document provides an overview of the StringSifter tool, which uses machine learning techniques to analyze and prioritize strings extracted from binaries. StringSifter was developed by FireEye to help analysts more efficiently identify the most relevant strings for malware analysis. It uses weak supervision and learning to rank models to assign priority scores to strings based on features like entropy rates and regular expressions. This allows analysts to focus on the highest priority strings first. The document describes the development of the EMBER dataset used to train and evaluate StringSifter, the labeling functions used for weak supervision, and the machine learning models employed, including gradient boosted decision trees and neural networks. Evaluation shows StringSifter performs well on a holdout set of
Nowadays, CPU microarchitecture is concealed from developers by compilers, VMs, etc.
Do Java developers need to know microarchitecture details of modern processors?
Or, does it like to learn quantum mechanics for cooking?
Are Java developers safe from leaking low-level microarchitecture details into high level application performance behaviour?
We will try to answer these questions by analyzing several Java examples.
The document discusses a presentation about Certified Ethical Hacking. It begins by asking if computer hacking can be ethical and if one can be certified in it. It then explains that ethical hacking involves using hacking skills to test an organization's security defenses for vulnerabilities, with the organization's authorization. The rest of the document outlines the Certified Ethical Hacking certification program, including what is covered in the training course and exam. It provides examples of hacking tools and techniques taught as well as sample exam questions. The presentation emphasizes that ethical hacking is just one part of managing security risks and that there is no single solution to security issues.
Codeception Testing Framework -- English #phpkansaiFlorent Batard
The document discusses introducing Codeception, a PHP testing framework. It begins with an agenda that includes a presentation on Codeception, different test types, a demonstration, and best practices. It then introduces the speaker, Florent Batard, who is a security engineer and web developer from France. He explains why testing is important for reducing assumptions and validating that code runs as expected. The bulk of the document then focuses on Codeception, explaining what it is, how it works, the different types of tests it supports including acceptance, functional, and unit tests, and how to install and use it. Code examples are provided and it concludes with referencing materials and opening the floor for questions.
The document discusses the Leap Motion Controller and Myo gesture control devices. It provides an overview of their technical specifications including tracking accuracy, supported languages, data models, and examples of applications. It also shares some of the author's insights on designing gesture-based applications.
How to develop web APIs in PHP using the popular Zend Expressive framework. This webinar focuses on the REST API using the HAL-JSON format, the Problem Details format for error handling, and authentication using OAuth2.
Odoo ERP software
Odoo ERP software, a leading open-source software for Enterprise Resource Planning (ERP) and business management, has recently launched its latest version, Odoo 17 Community Edition. This update introduces a range of new features and enhancements designed to streamline business operations and support growth.
The Odoo Community serves as a cost-free edition within the Odoo suite of ERP systems. Tailored to accommodate the standard needs of business operations, it provides a robust platform suitable for organisations of different sizes and business sectors. Within the Odoo Community Edition, users can access a variety of essential features and services essential for managing day-to-day tasks efficiently.
This blog presents a detailed overview of the features available within the Odoo 17 Community edition, and the differences between Odoo 17 community and enterprise editions, aiming to equip you with the necessary information to make an informed decision about its suitability for your business.
Revolutionizing Visual Effects Mastering AI Face Swaps.pdfUndress Baby
The quest for the best AI face swap solution is marked by an amalgamation of technological prowess and artistic finesse, where cutting-edge algorithms seamlessly replace faces in images or videos with striking realism. Leveraging advanced deep learning techniques, the best AI face swap tools meticulously analyze facial features, lighting conditions, and expressions to execute flawless transformations, ensuring natural-looking results that blur the line between reality and illusion, captivating users with their ingenuity and sophistication.
Web:- https://undressbaby.com/
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppGoogle
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
👉👉 Click Here To Get More Info 👇👇
https://sumonreview.com/ai-fusion-buddy-review
AI Fusion Buddy Review: Key Features
✅Create Stunning AI App Suite Fully Powered By Google's Latest AI technology, Gemini
✅Use Gemini to Build high-converting Converting Sales Video Scripts, ad copies, Trending Articles, blogs, etc.100% unique!
✅Create Ultra-HD graphics with a single keyword or phrase that commands 10x eyeballs!
✅Fully automated AI articles bulk generation!
✅Auto-post or schedule stunning AI content across all your accounts at once—WordPress, Facebook, LinkedIn, Blogger, and more.
✅With one keyword or URL, generate complete websites, landing pages, and more…
✅Automatically create & sell AI content, graphics, websites, landing pages, & all that gets you paid non-stop 24*7.
✅Pre-built High-Converting 100+ website Templates and 2000+ graphic templates logos, banners, and thumbnail images in Trending Niches.
✅Say goodbye to wasting time logging into multiple Chat GPT & AI Apps once & for all!
✅Save over $5000 per year and kick out dependency on third parties completely!
✅Brand New App: Not available anywhere else!
✅ Beginner-friendly!
✅ZERO upfront cost or any extra expenses
✅Risk-Free: 30-Day Money-Back Guarantee!
✅Commercial License included!
See My Other Reviews Article:
(1) AI Genie Review: https://sumonreview.com/ai-genie-review
(2) SocioWave Review: https://sumonreview.com/sociowave-review
(3) AI Partner & Profit Review: https://sumonreview.com/ai-partner-profit-review
(4) AI Ebook Suite Review: https://sumonreview.com/ai-ebook-suite-review
#AIFusionBuddyReview,
#AIFusionBuddyFeatures,
#AIFusionBuddyPricing,
#AIFusionBuddyProsandCons,
#AIFusionBuddyTutorial,
#AIFusionBuddyUserExperience
#AIFusionBuddyforBeginners,
#AIFusionBuddyBenefits,
#AIFusionBuddyComparison,
#AIFusionBuddyInstallation,
#AIFusionBuddyRefundPolicy,
#AIFusionBuddyDemo,
#AIFusionBuddyMaintenanceFees,
#AIFusionBuddyNewbieFriendly,
#WhatIsAIFusionBuddy?,
#HowDoesAIFusionBuddyWorks
Essentials of Automations: The Art of Triggers and Actions in FMESafe Software
In this second installment of our Essentials of Automations webinar series, we’ll explore the landscape of triggers and actions, guiding you through the nuances of authoring and adapting workspaces for seamless automations. Gain an understanding of the full spectrum of triggers and actions available in FME, empowering you to enhance your workspaces for efficient automation.
We’ll kick things off by showcasing the most commonly used event-based triggers, introducing you to various automation workflows like manual triggers, schedules, directory watchers, and more. Plus, see how these elements play out in real scenarios.
Whether you’re tweaking your current setup or building from the ground up, this session will arm you with the tools and insights needed to transform your FME usage into a powerhouse of productivity. Join us to discover effective strategies that simplify complex processes, enhancing your productivity and transforming your data management practices with FME. Let’s turn complexity into clarity and make your workspaces work wonders!
Takashi Kobayashi and Hironori Washizaki, "SWEBOK Guide and Future of SE Education," First International Symposium on the Future of Software Engineering (FUSE), June 3-6, 2024, Okinawa, Japan
What is Master Data Management by PiLog Groupaymanquadri279
PiLog Group's Master Data Record Manager (MDRM) is a sophisticated enterprise solution designed to ensure data accuracy, consistency, and governance across various business functions. MDRM integrates advanced data management technologies to cleanse, classify, and standardize master data, thereby enhancing data quality and operational efficiency.
Zoom is a comprehensive platform designed to connect individuals and teams efficiently. With its user-friendly interface and powerful features, Zoom has become a go-to solution for virtual communication and collaboration. It offers a range of tools, including virtual meetings, team chat, VoIP phone systems, online whiteboards, and AI companions, to streamline workflows and enhance productivity.
Transform Your Communication with Cloud-Based IVR SolutionsTheSMSPoint
Discover the power of Cloud-Based IVR Solutions to streamline communication processes. Embrace scalability and cost-efficiency while enhancing customer experiences with features like automated call routing and voice recognition. Accessible from anywhere, these solutions integrate seamlessly with existing systems, providing real-time analytics for continuous improvement. Revolutionize your communication strategy today with Cloud-Based IVR Solutions. Learn more at: https://thesmspoint.com/channel/cloud-telephony
SOCRadar's Aviation Industry Q1 Incident Report is out now!
The aviation industry has always been a prime target for cybercriminals due to its critical infrastructure and high stakes. In the first quarter of 2024, the sector faced an alarming surge in cybersecurity threats, revealing its vulnerabilities and the relentless sophistication of cyber attackers.
SOCRadar’s Aviation Industry, Quarterly Incident Report, provides an in-depth analysis of these threats, detected and examined through our extensive monitoring of hacker forums, Telegram channels, and dark web platforms.
E-commerce Application Development Company.pdfHornet Dynamics
Your business can reach new heights with our assistance as we design solutions that are specifically appropriate for your goals and vision. Our eCommerce application solutions can digitally coordinate all retail operations processes to meet the demands of the marketplace while maintaining business continuity.
UI5con 2024 - Boost Your Development Experience with UI5 Tooling ExtensionsPeter Muessig
The UI5 tooling is the development and build tooling of UI5. It is built in a modular and extensible way so that it can be easily extended by your needs. This session will showcase various tooling extensions which can boost your development experience by far so that you can really work offline, transpile your code in your project to use even newer versions of EcmaScript (than 2022 which is supported right now by the UI5 tooling), consume any npm package of your choice in your project, using different kind of proxies, and even stitching UI5 projects during development together to mimic your target environment.
Using Query Store in Azure PostgreSQL to Understand Query PerformanceGrant Fritchey
Microsoft has added an excellent new extension in PostgreSQL on their Azure Platform. This session, presented at Posette 2024, covers what Query Store is and the types of information you can get out of it.
Microservice Teams - How the cloud changes the way we workSven Peters
A lot of technical challenges and complexity come with building a cloud-native and distributed architecture. The way we develop backend software has fundamentally changed in the last ten years. Managing a microservices architecture demands a lot of us to ensure observability and operational resiliency. But did you also change the way you run your development teams?
Sven will talk about Atlassian’s journey from a monolith to a multi-tenanted architecture and how it affected the way the engineering teams work. You will learn how we shifted to service ownership, moved to more autonomous teams (and its challenges), and established platform and enablement teams.
Atelier - Innover avec l’IA Générative et les graphes de connaissancesNeo4j
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Allez au-delà du battage médiatique autour de l’IA et découvrez des techniques pratiques pour utiliser l’IA de manière responsable à travers les données de votre organisation. Explorez comment utiliser les graphes de connaissances pour augmenter la précision, la transparence et la capacité d’explication dans les systèmes d’IA générative. Vous partirez avec une expérience pratique combinant les relations entre les données et les LLM pour apporter du contexte spécifique à votre domaine et améliorer votre raisonnement.
Amenez votre ordinateur portable et nous vous guiderons sur la mise en place de votre propre pile d’IA générative, en vous fournissant des exemples pratiques et codés pour démarrer en quelques minutes.
UI5con 2024 - Keynote: Latest News about UI5 and it’s EcosystemPeter Muessig
Learn about the latest innovations in and around OpenUI5/SAPUI5: UI5 Tooling, UI5 linter, UI5 Web Components, Web Components Integration, UI5 2.x, UI5 GenAI.
Recording:
https://www.youtube.com/live/MSdGLG2zLy8?si=INxBHTqkwHhxV5Ta&t=0
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
Семантика final полей в java
1. Ñåìàíòèêà final ïîëåé â java
Âëàäèìèð Ñèòíèêîâ, Âàëåíòèí Êîâàëåíêî
sitnikov@netcracker.com, @VladimirSitnikv
NetCracker
Ñåíòÿáðü 2014
2. Ââåäåíèå
Ïðèìåðû
2 / 103 (c) Copyright 2014, NetCracker Technology Corp. All rights reserved
3. Çà÷åì final â JMM?
3 / 103 (c) Copyright 2014, NetCracker Technology Corp. All rights reserved
4. Áåçîïàñíîñòü String
String s = ...
if ( checkAccess (s)) {
return readFile (s);
}
Ïðàâèëüíî ëè ïðîâåðÿþòñÿ ïðàâà íà äîñòóï ê ôàéëó?
4 / 103 (c) Copyright 2014, NetCracker Technology Corp. All rights reserved
5. Áåç îïàñíîñòü String â java 1.4
String s = ...
if ( checkAccess (s)) {
return readFile (s);
}
Îòâåò çàâèñèò îò âåðñèè, è â java 1.4 âîçìîæíû ïðîáëåìû
5 / 103 (c) Copyright 2014, NetCracker Technology Corp. All rights reserved
6. Áåç îïàñíîñòü String â java 1.4
String s = GLOBAL ;
if ( checkAccess (s)) {
return readFile (s);
}
HackThread
GLOBAL =
"/tmp/ etc / passwd "
. substring (4);
Íàïðèìåð: HackThread âûïîëíÿåò .substring(4) è êîâàðíî
ïåðåäà¼ò åãî â ïîòîê, ÷èòàþùèé ôàéëû
6 / 103 (c) Copyright 2014, NetCracker Technology Corp. All rights reserved
7. Áåç îïàñíîñòü String â java 1.4
String s = GLOBAL ;
if ( checkAccess (s)) {
return readFile (s);
}
HackThread
GLOBAL =
"/tmp/ etc / passwd "
. substring (4);
 java 1.4 substring-ñòðîêà ññûëàåòñÿ íà òîò æå ìàññèâ
ñèìâîëîâ, è âñ¼ îïðåëåäÿåòñÿ ïîëÿìè String#offset è String#size
7 / 103 (c) Copyright 2014, NetCracker Technology Corp. All rights reserved
8. Áåç îïàñíîñòü String â java 1.4
String s = GLOBAL ;
if ( checkAccess (s)) {
return readFile (s);
}
HackThread
GLOBAL =
"/tmp/ etc / passwd "
. substring (4);
race
race
Ñèíõðîíèçàöèè ìåæäó ïîòîêàìè íåò, ïîýòîìó ÷èòàòåëü ìîæåò
óâèäåòü íåäîèíèöèàëèçèðîâàííûé îáúåêò-ñòðîêó
8 / 103 (c) Copyright 2014, NetCracker Technology Corp. All rights reserved
9. Áåç îïàñíîñòü String â java 1.4
String s = GLOBAL ;
if ( checkAccess (s)) {
return readFile (s);
}
HackThread
GLOBAL =
"/tmp/ etc / passwd "
. substring (4);
race
race
checkAccess ìîæåò óâèäåòü "/tmp/etc/passwd", à readFile óæå
"/etc/passwd"
9 / 103 (c) Copyright 2014, NetCracker Technology Corp. All rights reserved
10. Áåç îïàñíîñòü String â java 1.4
String s = GLOBAL ;
if ( checkAccess (s)) {
return readFile (s);
}
HackThread
GLOBAL =
"/tmp/ etc / passwd "
. substring (4);
race
race
checkAccess ìîæåò óâèäåòü "/tmp/etc/passwd", à readFile óæå
"/etc/passwd"
Äàæå ñèíõðîíèçàöèÿ íà s è volatile íå ñïàñóò!
10 / 103 (c) Copyright 2014, NetCracker Technology Corp. All rights reserved
11. Áåçîïàñíîñòü String â java 1.5+
String s = GLOBAL ;
if ( checkAccess (s)) {
return readFile (s);
}
HackThread
GLOBAL =
"/tmp/ etc / passwd "
. substring (4);
hb
hb
 java 1.5+ final çàùèùàåò îò íåäîñîçäàííûõ îáúåêòîâ è
HackTread
11 / 103 (c) Copyright 2014, NetCracker Technology Corp. All rights reserved
12. Çà÷åì íàì JMM?
12 / 103 (c) Copyright 2014, NetCracker Technology Corp. All rights reserved
13. Êîä-çàãàäêà
int x = 1;
public int neverTryThisAtHome () {
int i = this .x; // it is 1, isn ’t it?
this . setX (2); // just updates x to 2
return this .x - i; // 2 - 1 == ...?
}
Êàêèå çíà÷åíèÿ ìîãóò âåðíóòüñÿ? 1? 0? -1?
13 / 103 (c) Copyright 2014, NetCracker Technology Corp. All rights reserved
14. Êîä-çàãàäêà
int x = 1;
public int neverTryThisAtHome () {
int i = this .x; // it is 1, isn ’t it?
this . setX (2); // just updates x to 2
return this .x - i; // 2 - 1 == ...?
}
Äà, òóò âåðí¼òñÿ 1
14 / 103 (c) Copyright 2014, NetCracker Technology Corp. All rights reserved
15. Êîä-çàãàäêà
final int x = 1;
public int neverTryThisAtHome () {
int i = this .x; // it is 1, isn ’t it?
this . setX (2); // just updates x to 2
return this .x - i; // 2 - 1 == ...?
}
À òåïåðü äîáàâèì íîæåê final
15 / 103 (c) Copyright 2014, NetCracker Technology Corp. All rights reserved
16. Êîä-çàãàäêà
final int x = 1;
public int neverTryThisAtHome () {
int i = this .x; // it is 1, isn ’t it?
this . setX (2); // just updates x to 2
return this .x - i; // 2 - 1 == ...?
}
Ñïåöèôèêàöèÿ ðàçðåøàåò âñå âàðèàíòû: 1, 0, è äàæå -1! (ñì.
ïðèìåð 17.5.3-1)
16 / 103 (c) Copyright 2014, NetCracker Technology Corp. All rights reserved
17. Íåìíîãî òåîðèè
17 / 103 (c) Copyright 2014, NetCracker Technology Corp. All rights reserved
18. Ïðîãðàììíûé ïîðÿäîê (program order)
I Îòðàæàåò òî, â êàêîì ïîðÿäêå íàïèñàí èñõîäíûé êîä
18 / 103 (c) Copyright 2014, NetCracker Technology Corp. All rights reserved
19. Ïðîãðàììíûé ïîðÿäîê (program order)
I Îòðàæàåò òî, â êàêîì ïîðÿäêå íàïèñàí èñõîäíûé êîä
I Êîìïèëÿòîðó çàïðåùåíî ïåðåóïîðÿäî÷èâàòü, èãíîðèðîâàòü è
ìåíÿòü îïåðàöèè, åñëè ýòî íàðóøèò program order
19 / 103 (c) Copyright 2014, NetCracker Technology Corp. All rights reserved
20. Ïðîãðàììíûé ïîðÿäîê (program order)
I Îòðàæàåò òî, â êàêîì ïîðÿäêå íàïèñàí èñõîäíûé êîä
I Êîìïèëÿòîðó çàïðåùåíî ïåðåóïîðÿäî÷èâàòü, èãíîðèðîâàòü è
ìåíÿòü îïåðàöèè, åñëè ýòî íàðóøèò program order
I Íî ýòî íå çíà÷èò, ÷òî âñ¼ âûïîëíÿåòñÿ èìåííî òàê, êàê â
èñõîäíîì êîäå
20 / 103 (c) Copyright 2014, NetCracker Technology Corp. All rights reserved
21. Ïðîãðàììíûé ïîðÿäîê (program order)
I Îòðàæàåò òî, â êàêîì ïîðÿäêå íàïèñàí èñõîäíûé êîä
I Êîìïèëÿòîðó çàïðåùåíî ïåðåóïîðÿäî÷èâàòü, èãíîðèðîâàòü è
ìåíÿòü îïåðàöèè, åñëè ýòî íàðóøèò program order
I Íî ýòî íå çíà÷èò, ÷òî âñ¼ âûïîëíÿåòñÿ èìåííî òàê, êàê â
èñõîäíîì êîäå
I Íàïðèìåð: äëÿ îïåðàöèé íàä ëîêàëüíûìè ïåðåìåííûìè
program order âîîáùå íå îïðåäåë¼í
21 / 103 (c) Copyright 2014, NetCracker Technology Corp. All rights reserved
22. ×àñòè÷íûé ïîðÿäîê (partial order)
I Â ãëàâå 17 JLS 8 ðàç óïîìèíàåòñÿ ñëîâî "partial order"
22 / 103 (c) Copyright 2014, NetCracker Technology Corp. All rights reserved
23. ×àñòè÷íûé ïîðÿäîê (partial order)
I Â ãëàâå 17 JLS 8 ðàç óïîìèíàåòñÿ ñëîâî "partial order"
I ×àñòè÷íûì ïîðÿäêîì hb
! ÿâëÿåòñÿ áèíàðíîå îòíîøåíèå,
êîòîðîå:
23 / 103 (c) Copyright 2014, NetCracker Technology Corp. All rights reserved
24. ×àñòè÷íûé ïîðÿäîê (partial order)
I Â ãëàâå 17 JLS 8 ðàç óïîìèíàåòñÿ ñëîâî partial order
I ×àñòè÷íûì ïîðÿäêîì hb
! ÿâëÿåòñÿ áèíàðíîå îòíîøåíèå,
êîòîðîå:
I Ðåôëåêñèâíî: äëÿ ëþáîãî ýëåìåíòà x âûïîëíÿåòñÿ x
hb
! x
24 / 103 (c) Copyright 2014, NetCracker Technology Corp. All rights reserved
25. ×àñòè÷íûé ïîðÿäîê (partial order)
I Â ãëàâå 17 JLS 8 ðàç óïîìèíàåòñÿ ñëîâî partial order
I ×àñòè÷íûì ïîðÿäêîì hb
! ÿâëÿåòñÿ áèíàðíîå îòíîøåíèå,
êîòîðîå:
I Ðåôëåêñèâíî: äëÿ ëþáîãî ýëåìåíòà x âûïîëíÿåòñÿ x
hb
! x
I Àíòèñèììåòðè÷íî: åñëè x
hb
! y è y
hb
! x, òî x è y ýòî îäíî è
òî æå
25 / 103 (c) Copyright 2014, NetCracker Technology Corp. All rights reserved
26. ×àñòè÷íûé ïîðÿäîê (partial order)
I Â ãëàâå 17 JLS 8 ðàç óïîìèíàåòñÿ ñëîâî partial order
I ×àñòè÷íûì ïîðÿäêîì hb
! ÿâëÿåòñÿ áèíàðíîå îòíîøåíèå,
êîòîðîå:
I Ðåôëåêñèâíî: äëÿ ëþáîãî ýëåìåíòà x âûïîëíÿåòñÿ x
hb
! x
I Àíòèñèììåòðè÷íî: åñëè x
hb
! y è y
hb
! x, òî x è y ýòî îäíî è
òî æå
I Òðàíçèòèâíî: åñëè x
hb
! y è y
hb
! z, òî x
hb
! z
26 / 103 (c) Copyright 2014, NetCracker Technology Corp. All rights reserved
27. Happens-before
I Îñíîâíîé ïðèíöèï JMM: ðàññìîòðèì âñå âîçìîæíûå
âûïîëíåíèÿ è îòêèíåì íåïðàâèëüíûå
27 / 103 (c) Copyright 2014, NetCracker Technology Corp. All rights reserved
28. Happens-before
I Îñíîâíîé ïðèíöèï JMM: ðàññìîòðèì âñå âîçìîæíûå
âûïîëíåíèÿ è îòêèíåì íåïðàâèëüíûå
I Happens-before ýòî ÷àñòè÷íûé ïîðÿäîê, êîòîðûé äîëæåí
ñîáëþäàòüñÿ
28 / 103 (c) Copyright 2014, NetCracker Technology Corp. All rights reserved
29. Happens-before
I Îñíîâíîé ïðèíöèï JMM: ðàññìîòðèì âñå âîçìîæíûå
âûïîëíåíèÿ è îòêèíåì íåïðàâèëüíûå
I Happens-before ýòî ÷àñòè÷íûé ïîðÿäîê, êîòîðûé äîëæåí
ñîáëþäàòüñÿ
I Çàïðåùåíî âèäåòü áóäóùèå çàïèñè (r hb
! w)
29 / 103 (c) Copyright 2014, NetCracker Technology Corp. All rights reserved
30. Happens-before
I Îñíîâíîé ïðèíöèï JMM: ðàññìîòðèì âñå âîçìîæíûå
âûïîëíåíèÿ è îòêèíåì íåïðàâèëüíûå
I Happens-before ýòî ÷àñòè÷íûé ïîðÿäîê, êîòîðûé äîëæåí
ñîáëþäàòüñÿ
I Çàïðåùåíî âèäåòü áóäóùèå çàïèñè (r hb
! w)
I È òå, êîòîðûå áûëè ïåðåò¼ðëèñü â hb ïîðÿäêå:
w1 hb
! w2 hb
! r
30 / 103 (c) Copyright 2014, NetCracker Technology Corp. All rights reserved
31. Happens-before
I Îñíîâíîé ïðèíöèï JMM: ðàññìîòðèì âñå âîçìîæíûå
âûïîëíåíèÿ è îòêèíåì íåïðàâèëüíûå
I Happens-before ýòî ÷àñòè÷íûé ïîðÿäîê, êîòîðûé äîëæåí
ñîáëþäàòüñÿ
I Çàïðåùåíî âèäåòü áóäóùèå çàïèñè (r hb
! w)
I È òå, êîòîðûå áûëè ïåðåò¼ðëèñü â hb ïîðÿäêå:
w1 hb
! w2 hb
! r
I È òå, êîòîðûå çàïðåùåíû ïðîñòî òàê: 17.4.8 executions and
causality requirements
31 / 103 (c) Copyright 2014, NetCracker Technology Corp. All rights reserved
32. Ñåìàíòèêà final ïîëåé îäíèì ñëàéäîì
w hb
! f hb
! a mc
! r2 ) w hb
! r1 dr
! r2
I w è r2 – èíòåðåñóþùèå íàñ íàñ çàïèñü è ÷òåíèå
32 / 103 (c) Copyright 2014, NetCracker Technology Corp. All rights reserved
33. Ñåìàíòèêà final ïîëåé îäíèì ñëàéäîì
w hb
! f hb
! a mc
! r2 ) w hb
! r1 dr
! r2
I w è r2 – èíòåðåñóþùèå íàñ íàñ çàïèñü è ÷òåíèå
I f – çàìîðîçêà final ïîëÿ, êîòîðîå ÷èòàåòñÿ â r1
33 / 103 (c) Copyright 2014, NetCracker Technology Corp. All rights reserved
34. Ñåìàíòèêà final ïîëåé îäíèì ñëàéäîì
w hb
! f hb
! a mc
! r2 ) w hb
! r1 dr
! r2
I Åñëè åäèíñòâåííûé ïóòü îò çàïèñè ê ÷òåíèþ èä¼ò ÷åðåç âñå
ýòè ñòðåëî÷êè, òî ìû íå ìîæåì óâèäåòü áîëåå ðàííèå çàïèñè
34 / 103 (c) Copyright 2014, NetCracker Technology Corp. All rights reserved
35. Ñåìàíòèêà final ïîëåé îäíèì ñëàéäîì
w hb
! f hb
! a mc
! r2 ) w hb
! r1 dr
! r2
I Åñëè åäèíñòâåííûé ïóòü îò çàïèñè ê ÷òåíèþ èä¼ò ÷åðåç âñå
ýòè ñòðåëî÷êè, òî ìû íå ìîæåì óâèäåòü áîëåå ðàííèå çàïèñè
I Åñëè ïóòåé áîëüøå îäíîãî – êàê ïîâåç¼ò
35 / 103 (c) Copyright 2014, NetCracker Technology Corp. All rights reserved
36. Freeze action w hb
! f hb
! a mc
! r1 dr
! r2
36 / 103 (c) Copyright 2014, NetCracker Technology Corp. All rights reserved
37. Freeze action w hb
! f hb
! a mc
! r1 dr
! r2
Freeze action
37 / 103 (c) Copyright 2014, NetCracker Technology Corp. All rights reserved
38. Freeze action w hb
! f hb
! a mc
! r1 dr
! r2
Freeze action
Ïîëå
Freeze
ñëó÷àåòñÿ â êîíöå êîíñòðóêòîðà è ìîðîçèò final ïîëÿ
38 / 103 (c) Copyright 2014, NetCracker Technology Corp. All rights reserved
39. Dereference chain: ÷òî ýòî? w hb
! f hb
! a mc
! r1 dr
! r2
T local = GLOBAL ; r1
int localX = local .x; r2
I r2 ÷èòàåò ïîëå îáúåêòà
39 / 103 (c) Copyright 2014, NetCracker Technology Corp. All rights reserved
40. Dereference chain: ÷òî ýòî? w hb
! f hb
! a mc
! r1 dr
! r2
T local = GLOBAL ; r1
int localX = local .x; r2
I r2 ÷èòàåò ïîëå îáúåêòà
I Ïîòîê íå ñîçäàâàë îáúåêò
40 / 103 (c) Copyright 2014, NetCracker Technology Corp. All rights reserved
41. Dereference chain: ÷òî ýòî? w hb
! f hb
! a mc
! r1 dr
! r2
T local = GLOBAL ; r1
int localX = local .x; r2
I r2 ÷èòàåò ïîëå îáúåêòà
I Ïîòîê íå ñîçäàâàë îáúåêò
I Çíà÷èò, ãäå-òî ìû äîëæíû áûëè ÷èòàòü àäðåñ ýòîãî îáúåêòà
41 / 103 (c) Copyright 2014, NetCracker Technology Corp. All rights reserved
42. Dereference chain: ÷òî ýòî? w hb
! f hb
! a mc
! r1 dr
! r2
T local = GLOBAL ; r1
int localX = local .x; r2
dr
I r2 ÷èòàåò ïîëå îáúåêòà
I Ïîòîê íå ñîçäàâàë îáúåêò
I Çíà÷èò, ãäå-òî ìû äîëæíû áûëè ÷èòàòü àäðåñ ýòîãî îáúåêòà
I Ýòî íàçûâàåòñÿ r1 dr
! r2
42 / 103 (c) Copyright 2014, NetCracker Technology Corp. All rights reserved
43. Dereference chain äâà ïîòîêà w hb
! f hb
! a mc
! r1 dr
! r2
Thread 1
T localA = new T();
GLOBAL = localA ;
Thread 2
T localB = GLOBAL ; r1
if ( localB != null ) {
int localX = localB .x; r2
}
dr
r1 dr
! r2 (÷èòàåì ïîëå íåñîçäàííîãî íàìè îáúåêòà)
43 / 103 (c) Copyright 2014, NetCracker Technology Corp. All rights reserved
44. Dereference chain äâà ïîòîêà w hb
! f hb
! a mc
! r1 dr
! r2
Thread 1
T localA = new T(); a
GLOBAL = localA ;
Thread 2
T localB = GLOBAL ; r1
if ( localB != null ) {
int localX = localB .x; r2
}
dr
dr?
Åñòü ëè a dr
! r2?
44 / 103 (c) Copyright 2014, NetCracker Technology Corp. All rights reserved
45. Dereference chain äâà ïîòîêà w hb
! f hb
! a mc
! r1 dr
! r2
Thread 1
T localA = new T(); a
GLOBAL = localA ;
Thread 2
T localB = GLOBAL ; r1
if ( localB != null ) {
int localX = localB .x; r2
}
dr
dr?
Ìåæäó ïîòîêàìè dr íå âîçíèêàåò!
45 / 103 (c) Copyright 2014, NetCracker Technology Corp. All rights reserved
46. Dereference chain: êîíòðîëüíûé âwûñòðåë hb
! f hb
! a mc
! r1 dr
! r2
T local = GLOBAL ; ra
local = GLOBAL ; rb
int localX = local .x; r2
Åñòü ëè çäåñü dr ?
46 / 103 (c) Copyright 2014, NetCracker Technology Corp. All rights reserved
47. Dereference chain: êîíòðîëüíûé âwûñòðåë hb
! f hb
! a mc
! r1 dr
! r2
T local = GLOBAL ; ra
local = GLOBAL ; rb
int localX = local .x; r2
dr?
dr?
Îäèí èç ra dr
! r2 èëè rb dr
! r2 òî÷íî äîëæåí áûòü, íî òî÷íåå
ñêàçàòü íåâîçìîæíî
47 / 103 (c) Copyright 2014, NetCracker Technology Corp. All rights reserved
48. Memory chain: ÷òî ýòî? w hb
! f hb
! a mc
! r1 dr
! r2
Thread 1
T o = new T ();
GL = o; w1
Thread 2
T o = GL; r1
GL2 = o;
Thread 3
T o = GL2;
int r = o.x;
mc
Åñëè ÷òåíèå âèäèò çàïèñü, òî w1 mc
! r1
48 / 103 (c) Copyright 2014, NetCracker Technology Corp. All rights reserved
49. Memory chain: ÷òî ýòî? w hb
! f hb
! a mc
! r1 dr
! r2
Thread 1
T o = new T ();
GL = o; w1
Thread 2
T o = GL; r1
GL2 = o; w2
Thread 3
T o = GL2;
int r = o.x;
mc
mc
Åñëè ïèøåì àäðåñ ñîçäàííîãî âðàãîì îáúåêòà, òî r1 mc
! w2
49 / 103 (c) Copyright 2014, NetCracker Technology Corp. All rights reserved
50. Memory chain: ÷òî ýòî? w hb
! f hb
! a mc
! r1 dr
! r2
Thread 1
T o = new T ();
GL = o; w1
Thread 2
T o = GL; r1
GL2 = o; w2
Thread 3
T o = GL2; r3
int r = o.x;
mc
mc
mc
r3 âèäèò w2 ) w2 mc
! r3
50 / 103 (c) Copyright 2014, NetCracker Technology Corp. All rights reserved
51. Memory chain: ÷òî ýòî? w hb
! f hb
! a mc
! r1 dr
! r2
Thread 1
T o = new T ();
GL = o; w1
Thread 2
T o = GL; r1
GL2 = o; w2
Thread 3
T o = GL2; r3
int r = o.x; r4
mc
mc
mc dr
r3 dr
! r4 (÷èòàåì ïîëå îáúåêòà)
51 / 103 (c) Copyright 2014, NetCracker Technology Corp. All rights reserved
52. Memory chain: ÷òî ýòî? w hb
! f hb
! a mc
! r1 dr
! r2
Thread 1
T o = new T ();
GL = o; w1
Thread 2
T o = GL; r1
GL2 = o; w2
Thread 3
T o = GL2; r3
int r = o.x; r4
mc
mc
mc dr
mc
r3 dr
! r4 (÷èòàåì ïîëå îáúåêòà) ) r3 mc
! r4
52 / 103 (c) Copyright 2014, NetCracker Technology Corp. All rights reserved
53. Memory chain: ÷òî ýòî? w hb
! f hb
! a mc
! r1 dr
! r2
Thread 1
T o = new T ();
GL = o; w1
Thread 2
T o = GL; r1
GL2 = o; w2
Thread 3
T o = GL2; r3
int r = o.x; r4
mc
mc
mc dr
mc
mc
mc òðàíçèòèâíî (ò.ê. ÷àñòè÷íûé ïîðÿäîê) ) w1 mc
! r4
53 / 103 (c) Copyright 2014, NetCracker Technology Corp. All rights reserved
54. Ââåäåíèå
Ïðèìåðû
54 / 103 (c) Copyright 2014, NetCracker Technology Corp. All rights reserved
55. Disclaimer
I Âñå ïðèìåðû îïàñíî ñèíõðîíèçèðîâàíû (èíà÷å çà÷åì ìû
ñîáðàëèñü?)
55 / 103 (c) Copyright 2014, NetCracker Technology Corp. All rights reserved
56. Disclaimer
I Âñå ïðèìåðû îïàñíî ñèíõðîíèçèðîâàíû (èíà÷å çà÷åì ìû
ñîáðàëèñü?)
I Ñëó÷àè ÷òåíèÿ null íå ðàññìàòðèâàåì (äàæå åñëè îíè
âîçìîæíû)
56 / 103 (c) Copyright 2014, NetCracker Technology Corp. All rights reserved
57. Disclaimer
I Âñå ïðèìåðû îïàñíî ñèíõðîíèçèðîâàíû (èíà÷å çà÷åì ìû
ñîáðàëèñü?)
I Ñëó÷àè ÷òåíèÿ null íå ðàññìàòðèâàåì (äàæå åñëè îíè
âîçìîæíû)
I Ïðè ñîñòàâëåíèè ñëàéäîâ ïîñòðàäàë íå îäèí ìîçã
57 / 103 (c) Copyright 2014, NetCracker Technology Corp. All rights reserved
58. Ýòàëîííûé final (1) w hb
! f hb
! a mc
! r1 dr
! r2
Thread 1
T l = new T() {{
fx = 42; w
}};
GLOBAL = l;
Thread 2
T o = GLOBAL ;
if (o != null ) {
int result = o.fx; r2
}
Âîçìîæíî ëè â result ïîëó÷èòü 0?
58 / 103 (c) Copyright 2014, NetCracker Technology Corp. All rights reserved
59. Ýòàëîííûé final (1) w hb
! f hb
! a mc
! r1 dr
! r2
Thread 1
T l = new T() {{
fx = 42; w
}}; f
GLOBAL = l; a
Thread 2
T o = GLOBAL ;
if (o != null ) {
int result = o.fx;
}
hb
hb
Äåéñòâèÿ â îäíîì ïîòîêå îáðàçóþò happens-before:
w hb
! f , f hb
! a
59 / 103 (c) Copyright 2014, NetCracker Technology Corp. All rights reserved
60. Ýòàëîííûé final (1) w hb
! f hb
! a mc
! r1 dr
! r2
Thread 1
T l = new T() {{
fx = 42; w
}}; f
GLOBAL = l; a
Thread 2
T o = GLOBAL ; r0
if (o != null ) {
int result = o.fx;
}
hb
hb
mc
r0 âèäèò çàïèñü a :
a mc
! r0
60 / 103 (c) Copyright 2014, NetCracker Technology Corp. All rights reserved
61. Ýòàëîííûé final (1) w hb
! f hb
! a mc
! r1 dr
! r2
Thread 1
T l = new T() {{
fx = 42; w
}}; f
GLOBAL = l; a
Thread 2
T o = GLOBAL ; r0
if (o != null ) {
int result = o.fx; r1
}
hb
hb
mc
dr
Ïîòîê 2 íå ñîçäàâàë îáúåêò, r1 ÷èòàåò åãî ïîëå, à r ýòî
åäèíñòâåííîå ÷òåíèå àäðåñà îáúåêòà, ïîýòîìó dereference chain:
r0 dr
! r1
61 / 103 (c) Copyright 2014, NetCracker Technology Corp. All rights reserved
62. Ýòàëîííûé final (1) w hb
! f hb
! a mc
! r1 dr
! r2
Thread 1
T l = new T() {{
fx = 42; w
}}; f
GLOBAL = l; a
Thread 2
T o = GLOBAL ; r0
if (o != null ) {
int result = o.fx; r1
}
hb
hb
mc
dr
mc
r0 dr
! r1 ) r0 mc
! r1
62 / 103 (c) Copyright 2014, NetCracker Technology Corp. All rights reserved
63. Ýòàëîííûé final (1) w hb
! f hb
! a mc
! r1 dr
! r2
Thread 1
T l = new T() {{
fx = 42; w
}}; f
GLOBAL = l; a
Thread 2
T o = GLOBAL ; r0
if (o != null ) {
int result = o.fx; r1
}
hb
hb
mc
mc
mc
a mc
! r1 ( mc òðàíçèòèâíî)
63 / 103 (c) Copyright 2014, NetCracker Technology Corp. All rights reserved
64. Ýòàëîííûé final (1) w hb
! f hb
! a mc
! r1 dr
! r2
Thread 1
T l = new T() {{
fx = 42; w
}}; f
GLOBAL = l; a
Thread 2
T o = GLOBAL ;
if (o != null ) {
int result = o.fx; r1 r2
}
hb
hb
mc
dr
Âîçüì¼ì r2 = r 1, òîãäà r1 dr
! r2 ( dr ðåôëåêñèâíî)
64 / 103 (c) Copyright 2014, NetCracker Technology Corp. All rights reserved
65. Ýòàëîííûé final (1) w hb
! f hb
! a mc
! r1 dr
! r2
Thread 1
T l = new T() {{
fx = 42; w
}}; f
GLOBAL = l; a
Thread 2
T o = GLOBAL ;
if (o != null ) {
int result = o.fx; r1 r2
}
hb
hb
mc
dr
hb*
Íàøëè âñ¼ íåîáõîäèìîå äëÿ HB:
w hb
! f hb
! a mc
! r2 ) w hb
! r1 dr
! r2
65 / 103 (c) Copyright 2014, NetCracker Technology Corp. All rights reserved
66. Ýòàëîííûé final (1) w hb
! f hb
! a mc
! r1 dr
! r2
Thread 1
T l = new T() {{
fx = 42; w
}}; f
GLOBAL = l; a
Thread 2
T o = GLOBAL ;
if (o != null ) {
int result = o.fx; r1 r2
}
hb
hb
mc
dr
hb*
(w hb
! r2) ) result 2 f42g
66 / 103 (c) Copyright 2014, NetCracker Technology Corp. All rights reserved
67. Ìàññèâ âíóòðè final (2) w hb
! f hb
! a mc
! r1 dr
! r2
T l = new T() {{
int [] u = new int [1];
u [0] = 42; w
fx = u;
}};
GLOBAL = l;
T o = GLOBAL ;
if (o != null ) {
int [] lfx = o.fx;
int result = lfx [0]; r2
}
Âîçìîæíî ëè â result ïîëó÷èòü 0?
67 / 103 (c) Copyright 2014, NetCracker Technology Corp. All rights reserved
68. Ìàññèâ âíóòðè final (2) w hb
! f hb
! a mc
! r1 dr
! r2
T l = new T() {{
int [] u = new int [1];
u [0] = 42; w
fx = u;
}}; f
GLOBAL = l; a
T o = GLOBAL ;
if (o != null ) {
int [] lfx = o.fx;
int result = lfx [0]; r2
}
hb
hb
Äåéñòâèÿ â îäíîì ïîòîêå îáðàçóþò happens-before:
w hb
! f , f hb
! a
68 / 103 (c) Copyright 2014, NetCracker Technology Corp. All rights reserved
69. Ìàññèâ âíóòðè final (2) w hb
! f hb
! a mc
! r1 dr
! r2
T l = new T() {{
int [] u = new int [1];
u [0] = 42; w
fx = u;
}}; f
GLOBAL = l; a
T o = GLOBAL ;
if (o != null ) {
int [] lfx = o.fx; r1
int result = lfx [0]; r2
}
hb
hb
mc
r1 âèäèò çàïèñü a (ò.ê. ïðîñòîå final ïîëå):
a mc
! r1
69 / 103 (c) Copyright 2014, NetCracker Technology Corp. All rights reserved
70. Ìàññèâ âíóòðè final (2) w hb
! f hb
! a mc
! r1 dr
! r2
T l = new T() {{
int [] u = new int [1];
u [0] = 42; w
fx = u;
}}; f
GLOBAL = l; a
T o = GLOBAL ;
if (o != null ) {
int [] lfx = o.fx; r1
int result = lfx [0]; r2
}
hb
hb
mc
dr
Ïîòîê 2 íå ñîçäàâàë ìàññèâ, r2 ÷èòàåò åãî ýëåìåíò, r1 ýòî
åäèíñòâåííîå ÷òåíèå àäðåñà ìàññèâà, ïîýòîìó dereference chain:
r1 dr
! r2
70 / 103 (c) Copyright 2014, NetCracker Technology Corp. All rights reserved
71. Ìàññèâ âíóòðè final (2) w hb
! f hb
! a mc
! r1 dr
! r2
T l = new T() {{
int [] u = new int [1];
u [0] = 42; w
fx = u;
}}; f
GLOBAL = l; a
T o = GLOBAL ;
if (o != null ) {
int [] lfx = o.fx; r1
int result = lfx [0]; r2
}
hb
hb
mc
dr
hb*
Íàøëè âñ¼ íåîáõîäèìîå äëÿ HB:
w hb
! f hb
! a mc
! r2 ) w hb
! r1 dr
! r2
71 / 103 (c) Copyright 2014, NetCracker Technology Corp. All rights reserved
72. Ìàññèâ âíóòðè final (2) w hb
! f hb
! a mc
! r1 dr
! r2
T l = new T() {{
int [] u = new int [1];
u [0] = 42; w
fx = u;
}}; f
GLOBAL = l; a
T o = GLOBAL ;
if (o != null ) {
int [] lfx = o.fx; r1
int result = lfx [0]; r2
}
hb
hb
mc
dr
hb*
(w hb
! r2) ) result 2 f42g
72 / 103 (c) Copyright 2014, NetCracker Technology Corp. All rights reserved
73. Ìàññèâ íàîáîðîò (2.1) w hb
! f hb
! a mc
! r1 dr
! r2
T l = new T() {{
int [] u = new int [1];
fx = u; // (!)
u [0] = 42; w
}};
GLOBAL = l;
T o = GLOBAL ;
if (o != null ) {
int [] lfx = o.fx;
int result = lfx [0];
}
Âîçìîæíî ëè â result ïîëó÷èòü 0?
73 / 103 (c) Copyright 2014, NetCracker Technology Corp. All rights reserved
74. Ìàññèâ íàîáîðîò (2.1) w hb
! f hb
! a mc
! r1 dr
! r2
T l = new T() {{
int [] u = new int [1];
fx = u; // (!)
u [0] = 42; w
}}; f
GLOBAL = l; a
T o = GLOBAL ;
if (o != null ) {
int [] lfx = o.fx; r1
int result = lfx [0]; r2
}
hb
hb
mc
dr
hb
Ñòðîèì hb òàê æå êàê è â ïðåäûäóùåì ñëó÷àå
74 / 103 (c) Copyright 2014, NetCracker Technology Corp. All rights reserved
75. Ìàññèâ íàîáîðîò (2.1) w hb
! f hb
! a mc
! r1 dr
! r2
T l = new T() {{
int [] u = new int [1];
fx = u; // (!)
u [0] = 42; w
}}; f
GLOBAL = l; a
T o = GLOBAL ;
if (o != null ) {
int [] lfx = o.fx; r1
int result = lfx [0]; r2
}
hb
hb
mc
dr
hb
(w hb
! r2) ) result 2 f42g
Ðåçóëüòàò íå çàâèñèò îò ïîðÿäêà çàïèñè final ïîëåé!
75 / 103 (c) Copyright 2014, NetCracker Technology Corp. All rights reserved
76. Óòåêàíèå this (3) w hb
! f hb
! a mc
! r1 dr
! r2
Thread 1
T l = new T() {{
fx = 42; w
GLOBAL = this ;
}};
Thread 2
T o = GLOBAL ;
if (o != null ) {
int result = o.fx; r2
}
Âîçìîæíî ëè â result ïîëó÷èòü 0?
76 / 103 (c) Copyright 2014, NetCracker Technology Corp. All rights reserved
77. Óòåêàíèå this (3) w hb
! f hb
! a mc
! r1 dr
! r2
Thread 1
T l = new T() {{
fx = 42; w
GLOBAL = this ; a
}}; f
Thread 2
T o = GLOBAL ;
if (o != null ) {
int result = o.fx; r2
}
hb
hb
Äåéñòâèÿ â îäíîì ïîòîêå îáðàçóþò happens-before:
w hb
! f , a hb
! f
77 / 103 (c) Copyright 2014, NetCracker Technology Corp. All rights reserved
78. Óòåêàíèå this (3) w hb
! f hb
! a mc
! r1 dr
! r2
Thread 1
T l = new T() {{
fx = 42; w
GLOBAL = this ; a
}}; f
Thread 2
T o = GLOBAL ;
if (o != null ) {
int result = o.fx; r2
}
hb
hb?
hb
Íî íàì-òî íóæíî f hb
! a!
78 / 103 (c) Copyright 2014, NetCracker Technology Corp. All rights reserved
79. Óòåêàíèå this (3) w hb
! f hb
! a mc
! r1 dr
! r2
Thread 1
T l = new T() {{
fx = 42; w
GLOBAL = this ; a
}}; f
Thread 2
T o = GLOBAL ;
if (o != null ) {
int result = o.fx; r2
}
hb
hb?
hb
Åñëè a hb
! f è f hb
! a, òî a = f (àíòèñèììåòðè÷íîñòü hb )
Íî ïóáëèêàöèÿ ññûëêè ýòî íèêàê íå freeze action!
79 / 103 (c) Copyright 2014, NetCracker Technology Corp. All rights reserved
80. Óòåêàíèå this (3) w hb
! f hb
! a mc
! r1 dr
! r2
Thread 1
T l = new T() {{
fx = 42; w
GLOBAL = this ; a
}}; f
Thread 2
T o = GLOBAL ;
if (o != null ) {
int result = o.fx; r2
}
hb
hb?
hb
Íåò hb , ïîýòîìó âîçìîæíû âñå âàðèàíòû: result 2 f0; 42g
80 / 103 (c) Copyright 2014, NetCracker Technology Corp. All rights reserved
81. Âðåäèòåëüñêîå óòåêàíèå this (4) w hb
! f hb
! a mc
! r1 dr
! r2
Thread 1
T l = new T() {{
fx = 42; w
GLb = this ;
}};
GLa = l;
Thread 2
T u = GLb;
T o = GLa;
if (o != null ) {
int result = o.fx; r2
}
Âîçìîæíî ëè â result ïîëó÷èòü 0?
81 / 103 (c) Copyright 2014, NetCracker Technology Corp. All rights reserved
82. Âðåäèòåëüñêîå óòåêàíèå this (4) w hb
! f hb
! a mc
! r1 dr
! r2
Thread 1
T l = new T() {{
fx = 42; w
GLb = this ; b
}}; f
GLa = l; a
Thread 2
T u = GLb;
T o = GLa;
if (o != null ) {
int result = o.fx;
}
hb
hb
hb?
Äåéñòâèÿ â îäíîì ïîòîêå îáðàçóþò happens-before:
w hb
! f , f hb
! a
82 / 103 (c) Copyright 2014, NetCracker Technology Corp. All rights reserved
83. Âðåäèòåëüñêîå óòåêàíèå this (4) w hb
! f hb
! a mc
! r1 dr
! r2
Thread 1
T l = new T() {{
fx = 42; w
GLb = this ; b
}}; f
GLa = l; a
Thread 2
T u = GLb;
T o = GLa; ra
if (o != null ) {
int result = o.fx;
}
hb
hb
hb?
mc
Ïóñòü âòîðîé ïîòîê óâèäåë GLa, òîãäà a mc
! ra!
83 / 103 (c) Copyright 2014, NetCracker Technology Corp. All rights reserved
84. Âðåäèòåëüñêîå óòåêàíèå this (4) w hb
! f hb
! a mc
! r1 dr
! r2
Thread 1
T l = new T() {{
fx = 42; w
GLb = this ; b
}}; f
GLa = l; a
Thread 2
T u = GLb; rb
T o = GLa; ra
if (o != null ) {
int result = o.fx; r1
}
hb
hb
hb?
mc
dr?
dr?
Ãäå-òî äîëæíî áûòü dr : rb dr
! r1 èëè ra dr
! r1
84 / 103 (c) Copyright 2014, NetCracker Technology Corp. All rights reserved
85. Âðåäèòåëüñêîå óòåêàíèå this (4) w hb
! f hb
! a mc
! r1 dr
! r2
Thread 1
T l = new T() {{
fx = 42; w
GLb = this ; b
}}; f
GLa = l; a
Thread 2
T u = GLb; rb
T o = GLa; ra
if (o != null ) {
int result = o.fx; r1
}
hb
hb
hb?
mc
dr?
dr
! r 1, òî ìû ïîïàëè, ò.ê. w hb
Åñëè rb dr
! r1 íå ñòðîèòñÿ
85 / 103 (c) Copyright 2014, NetCracker Technology Corp. All rights reserved
86. Âðåäèòåëüñêîå óòåêàíèå this (4) w hb
! f hb
! a mc
! r1 dr
! r2
Thread 1
T l = new T() {{
fx = 42; w
GLb = this ; b
}}; f
GLa = l; a
Thread 2
T u = GLb; rb
T o = GLa; ra
if (o != null ) {
int result = o.fx; r1
}
hb
hb
hb?
mc
dr?
dr
Âûâîä: åñëè íàø ïîòîê óæå ÷èòàë îáúåêò ñ íåçàìîðîæåííûìè
ïîëÿìè, òî ãàðàíòèé final semantics íåò!
86 / 103 (c) Copyright 2014, NetCracker Technology Corp. All rights reserved
87. Reflection in action (5) w hb
! f hb
! a mc
! r1 dr
! r2
T t = new T() {{
fu = new U ();
fu.x = 1; w1
}};
GLOBAL = t;
U w = new U ();
w.x = 42; w2
reflectSet (t.fu , w);
Thread 2
T t = GLOBAL ;
if (t != null ) {
U u = t.fu;
int result = u.x; r2
}
Âîçìîæíî ëè â result ïîëó÷èòü 0?
87 / 103 (c) Copyright 2014, NetCracker Technology Corp. All rights reserved
88. Reflection in action (5) w hb
! f hb
! a mc
! r1 dr
! r2
T t = new T() {{
fu = new U ();
fu.x = 1;
}};
GLOBAL = t;
U w = new U ();
w.x = 42; w2
reflectSet (t.fu , w);
Thread 2
T t = GLOBAL ;
if (t != null ) {
U u = t.fu;
int result = u.x; r2
}
hb*?
Ïî-õîðîøåìó, íàì íóæíî w2 hb
! r2 (èíà÷å íå çàïðåùåíî âèäåòü
çàïèñü 0 â w.x)
88 / 103 (c) Copyright 2014, NetCracker Technology Corp. All rights reserved
89. Reflection in action (5) w hb
! f hb
! a mc
! r1 dr
! r2
T t = new T() {{
fu = new U ();
fu.x = 1;
}};
GLOBAL = t;
U w = new U ();
w.x = 42; w2
reflectSet (t.fu , w); f2
Thread 2
T t = GLOBAL ;
if (t != null ) {
U u = t.fu;
int result = u.x; r2
}
hb*?
f2 íå ïîäõîäèò äëÿ hb : íåò ïîäõîäÿùåãî f 2 hb
! a
89 / 103 (c) Copyright 2014, NetCracker Technology Corp. All rights reserved
90. Reflection in action (5) w hb
! f hb
! a mc
! r1 dr
! r2
T t = new T() {{
fu = new U ();
fu.x = 1;
}}; f1
GLOBAL = t;
U w = new U ();
w.x = 42; w2
reflectSet (t.fu , w); f2
Thread 2
T t = GLOBAL ;
if (t != null ) {
U u = t.fu;
int result = u.x; r2
}
hb*?
hb?
f1 òîæå íå ïîäõîäèò äëÿ hb : äîëæíî áûòü w2 hb
! f 1
90 / 103 (c) Copyright 2014, NetCracker Technology Corp. All rights reserved
91. Reflection in action (5) w hb
! f hb
! a mc
! r1 dr
! r2
T t = new T() {{
fu = new U ();
fu.x = 1;
}}; f1
GLOBAL = t;
U w = new U ();
w.x = 42; w2
reflectSet (t.fu , w); f2
Thread 2
T t = GLOBAL ;
if (t != null ) {
U u = t.fu;
int result = u.x; r2
}
hb*?
hb?
Ïîëó÷àåòñÿ, ÷òî ÷òåíèþ r2 íå çàïðåùåíî âèäåòü 0
91 / 103 (c) Copyright 2014, NetCracker Technology Corp. All rights reserved
92. Reflection in action (5) w hb
! f hb
! a mc
! r1 dr
! r2
T t = new T() {{
fu = new U ();
fu.x = 1;
}}; f1
GLOBAL = t; a
U w = new U();
w.x = 42; w2
reflectSet (t.fu , w); f2
Thread 2
T t = GLOBAL ;
if (t != null ) {
U u = t.fu;
int result = u.x; r2
}
hb*?
hb?
Èòîãî: ïîñëå ïóáëèêàöèè ìåíÿòü final ïîëÿ îïàñíî
result 2 f0; 1; 42g
92 / 103 (c) Copyright 2014, NetCracker Technology Corp. All rights reserved
93. ×èíèì reflection (5.1) w hb
! f hb
! a mc
! r1 dr
! r2
T t = new T() {{
fu = new U ();
fu.x = 1;
}};
U w = new U ();
w.x = 42;
reflectSet (t.fu , w);
GLOBAL = t; a
Thread 2
T t = GLOBAL ;
if (t != null ) {
U u = t.fu;
int result = u.x;
}
Åñëè ïóáëèêîâàòü ññûëêó ïîñëå âñåõ èçìåíåíèé final ïîëåé, òî
âñ¼ ðàáîòàåò: result 2 f1; 42g
93 / 103 (c) Copyright 2014, NetCracker Technology Corp. All rights reserved
94. Final wrapper (6) w hb
! f hb
! a mc
! r1 dr
! r2
Thread 1
A a = new O() {{
fx = 42; w
}};
GL = a;
Thread 2
A a = GL;
B = new B() {{
fb = o;
}};
GL2 = b;
Thread 3
B B = GL2;
A a = b.fb;
int r = a.fx; r2
Âîçìîæíî ëè â result ïîëó÷èòü 0?
94 / 103 (c) Copyright 2014, NetCracker Technology Corp. All rights reserved
95. Final wrapper (6) w hb
! f hb
! a mc
! r1 dr
! r2
Thread 1
A a = new O() {{
fx = 42; w
}};
GL = a; wa
Thread 2
A a = GL; ra
B = new B() {{
fb = o; wb
}};
GL2 = b;
Thread 3
B B = GL2;
mc
A a = b.fb; rb
int r = a.fx; r1
mc
rb âèäèò wb ) wb mc
! rb
ra âèäèò çàïèñü wa : wa mc
! ra
95 / 103 (c) Copyright 2014, NetCracker Technology Corp. All rights reserved
96. Final wrapper (6) w hb
! f hb
! a mc
! r1 dr
! r2
Thread 1
A a = new O() {{
fx = 42; w
}};
GL = a; wa
Thread 2
A a = GL; ra
B = new B() {{
fb = o; wb
}};
GL2 = b;
Thread 3
B B = GL2;
mc
A a = b.fb; rb
int r = a.fx; r1
mc
mc
Ïîòîê 2 ïèøåò àäðåñ ñîçäàííîãî âðàãîì îáúåêòà, ïîýòîìó
ra mc
! wb
96 / 103 (c) Copyright 2014, NetCracker Technology Corp. All rights reserved
97. Final wrapper (6) w hb
! f hb
! a mc
! r1 dr
! r2
Thread 1
A a = new O() {{
fx = 42; w
}};
GL = a; wa
Thread 2
A a = GL; ra
B = new B() {{
fb = o; wb
}};
GL2 = b;
Thread 3
B B = GL2;
mc
A a = b.fb; rb
int r = a.fx; r1
mc
mc
dr
Ïîòîê 3 íå ñîçäàâàë îáúåêò A, r ÷èòàåò åãî ïîëå, à rb ýòî
åäèíñòâåííîå ÷òåíèå àäðåñà îáúåêòà, ïîýòîìó dereference chain:
rb dr
! r1
97 / 103 (c) Copyright 2014, NetCracker Technology Corp. All rights reserved
98. Final wrapper (6) w hb
! f hb
! a mc
! r1 dr
! r2
Thread 1
A a = new O() {{
fx = 42; w
}};
GL = a; wa
Thread 2
A a = GL; ra
B = new B() {{
fb = o; wb
}};
GL2 = b;
Thread 3
B B = GL2;
mc
A a = b.fb; rb
int r = a.fx; r1
mc
mc
dr
mc
rb dr
! r1 ) rb mc
! r1
98 / 103 (c) Copyright 2014, NetCracker Technology Corp. All rights reserved
99. Final wrapper (6) w hb
! f hb
! a mc
! r1 dr
! r2
Thread 1
A a = new O() {{
fx = 42; w
}};
GL = a; wa
Thread 2
A a = GL; ra
B = new B() {{
fb = o; wb
}};
GL2 = b;
Thread 3
B B = GL2;
mc
A a = b.fb; rb
int r = a.fx; r1
mc
mc
mc
mc
mc òðàíçèòèâíî (ò.ê. ÷àñòè÷íûé ïîðÿäîê) ) wa mc
! r1
99 / 103 (c) Copyright 2014, NetCracker Technology Corp. All rights reserved
100. Final wrapper (6) w hb
! f hb
! a mc
! r1 dr
! r2
Thread 1
A a = new O() {{
fx = 42; w
}}; f
GL = a; wa
Thread 2
A a = GL; ra
B = new B() {{
fb = o; wb
}};
GL2 = b;
Thread 3
B B = GL2;
A a = b.fb; rb
int r = a.fx; r1 r2
mc
dr
Âîçüì¼ì r2 = r 1, òîãäà r1 dr
! r2 ( dr ðåôëåêñèâíî)
100 / 103 (c) Copyright 2014, NetCracker Technology Corp. All rights reserved
101. Final wrapper (6) w hb
! f hb
! a mc
! r1 dr
! r2
Thread 1
A a = new O() {{
fx = 42; w
}}; f
GL = a; wa
Thread 2
A a = GL; ra
B = new B() {{
fb = o; wb
}};
GL2 = b;
Thread 3
B B = GL2;
A a = b.fb; rb
int r = a.fx; r1 r2
mc
dr
hb
hb
hb*
Íàøëè âñ¼ íåîáõîäèìîå äëÿ HB:
w hb
! f hb
! a mc
! r2 ) w hb
! r1 dr
! r2
101 / 103 (c) Copyright 2014, NetCracker Technology Corp. All rights reserved
102. Final wrapper (6) w hb
! f hb
! a mc
! r1 dr
! r2
Thread 1
A a = new O() {{
fx = 42; w
}}; f
GL = a; wa
Thread 2
A a = GL; ra
B = new B() {{
fb = o; wb
}};
GL2 = b;
Thread 3
B B = GL2;
A a = b.fb; rb
int r = a.fx; r1 r2
mc
dr
hb
hb
hb*
(w hb
! r2) ) result 2 f42g
102 / 103 (c) Copyright 2014, NetCracker Technology Corp. All rights reserved
103. Âîïðîñû?
103 / 103 (c) Copyright 2014, NetCracker Technology Corp. All rights reserved