{'fraction_non_alphanumeric': 0.014392630972941854, 'fraction_numerical': 0.0, 'mean_word_length': 4.972508591065292, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Detecting Anomalies in Concurrent Programs Based on Dynamic Control Flow Changes

As concurrent and multi-threaded programs are becoming more prevalent with the widespread adoption of multi-core processors, so are the bugs associated with concurrency. These bugs are notoriously hard to find and debug. One reason is that such bugs may be triggered only under rare circumstances, such as a low probability inter-leaving of the program threads. Once a failing execution of the program is observed, ideally we should be able to decipher from that failing run, a location in the program where the bug actually manifests. We present a dynamic approach for detecting concurrency bugs and show how to localise them to a small part of the program code that must be inspected. The key idea is that buggy executions deviate from the control flow path for correct executions. Our approach can detect this deviation from the expected behaviour by identifying Deviant Program Points (DPPs). The DPPs serve to facilitate in localising concurrency bugs. The approach employs dynamic binary instrumentation to record the number of conditional branches that are executed in a program over different executions, while keeping the same program input. This information is mapped back to the source language program to allow the user to understand the detected problem in source language terms. When applied to real world concurrency bugs, our tool is able to successfully pinpoint the location(s) in program code where its execution behaviour deviates from that of a correct program execution. Our system is able to eliminate false positives and localise to the deviant program point by using just a single failed program run with a high level of accuracy.