- 10 Apr, 2018 1 commit
-
-
Florian Hahn authored
The advantages of letting the compiler drive preprocessing and assemblying are * we do not have to look for cpp or the assembler * we can use COMPILE_OPTIONS to pass through options to the assembler * we can use Clang's assembler Issues: * Clang's preprocessor does not seem to preserve whitespaces as required * Clang's assembler does not support flags we need (maybe there are equivalent flags we have to use) * Clang does not show assembler help with -Wa,-help. Fixes #1675 Change-Id: I8ae45c39f071853cb95744d551993aba38faec1c
-
- 09 Apr, 2018 1 commit
-
-
Florian Hahn authored
This silences assembly deprecation warnings from some test cases. We might miss some valid assembly warnings, but the flag is only set when building tests. For builds without tests, we still get the warnings. Fixes #1675
-
- 07 Apr, 2018 2 commits
-
-
Derek Bruening authored
Adds support for several conflicts between aflags and xax on x86: failing to reserve xax due to lazy aflags still residing in xax; failing to reserve aflags if xax is taken; and failing to get the app aflags value if xax is taken. For the first one, we throw away the lazy aflags. For the other two, we reserve a temporary scratch register, xchg it with xax, and restore it afterward. We place aflags in TLS and do not try to keep it in a register. Issue: #511
-
Derek Bruening authored
Fixes a regression from f6e8e1c4 where drutil_insert_get_mem_addr() gets the wrong address for a far memref that uses the destination register, due to improper ordering of operations. Also optimizes from two steps to one for a far memref that uses the destination but not the scratch register and has only one of base or index. Fixes #2913
-
- 06 Apr, 2018 1 commit
-
-
Derek Bruening authored
Adds static TLS data to support drreg routines being called during process init before thread init has happened. Also adds support for drmgr_current_bb_phase(), which is called by drrreg, being called during process init. Adds a test case to drreg-test. Fixes #2910
-
- 24 Mar, 2018 1 commit
-
-
Derek Bruening authored
Fixes Mac build breakage from 8471d5cc. Issue: #2037
-
- 23 Mar, 2018 2 commits
-
-
Florian Hahn authored
This uses the encoding scheme introduced in #2811. Everything expect the tests are auto-generated now.
-
Florian Hahn authored
I raised issue for the failing tests on ARM. Ignoring those failures in ARM pre/postcommit testing makes it easier to spot new regressions. Issues: #2416, #2892, #2893, #2894
-
- 22 Mar, 2018 1 commit
-
-
Florian Hahn authored
2e9f20e4 made get_clean_call_switch_stack_size() 8-byte aligned for ARM, which is required by the "Procedure Call Standard for the ARM Architecture [AAPCS]" [1]. priv_mcontext_t on ARM only contains 31 8-byte slots, which is why an extra adjustment is needed in insert_push_all_registers. Fixes #2799 [1] http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.faqs/ka4127.html
-
- 20 Mar, 2018 1 commit
-
-
Derek Bruening authored
Refactors find_executable_vm_areas() to share its map entry skipping with the re-takeover re-walk from b06a7022, but not its module list or executable area updates. This entry skipping for vmheap turns out to make a big performance difference when attaching. Removes individual updates to memcache for entries inside vmheap which were already bulk-added for the find_executable_vm_areas() walk. Issue: #2037
-
- 15 Mar, 2018 2 commits
-
-
Derek Bruening authored
Added dr_where_am_i() to better support client self-profiling via sampling. This also provides the fragment tag, by refactoring the pcprofile code into a new helper fcache_refine_whereami(). Renamed the whereami types to better avoid name conflicts: s/WHERE_xxx/DR_WHERE_xxx/ and s/where_am_i_t/dr_where_am_i_t/. Exported the dr_where_am_i_t enum. Fixed a bug where an uninitialized mcontext was passed to a client timer callback: we only filled in the mcontext for a DR-internal callback. Added a test of client sampling to client.timer Issue: #140
-
John F.X. Galea authored
Adds new versions of drmgr's pre and post syscall events that take in user data parameters. Adds tests of the new functions. Issue: #2833
-
- 08 Mar, 2018 1 commit
-
-
John F.X. Galea authored
Adds new versions of drmgr's module load/unload events that take in user data parameters. Adds tests of the new functions. Issue: #2833
-
- 07 Mar, 2018 5 commits
-
-
Derek Bruening authored
Adds a missing error capture in raw2trace_t::read_and_map_modules() where an error in module parsing was accidentally ignored.
-
Derek Bruening authored
Allows for zero data or instruction refs on a core and thus no printed miss rate, to reduce flakiness in the burst_threads test. Issue: #2092
-
Derek Bruening authored
Adds a complete maps file walk to update the memcache on re-taking-over the process for dr_api_start. The memcache is cleared beforehand to avoid both false positives and negatives in later queries. This helps to solve issues with a gap between dr_app_setup() and dr_app_start(). Does not update the executable areas or module list: they are more difficult to re-walk, and existing lazy updates to those will suffice for now, with a low risk of false positives. Adds updating of the memcache on a query miss. Previously we would just continue to miss and walk the maps file every time. Tested manually by disabling the i#2114 change so that a signal does a query, adding signals to the burst_threads test, and calling dr_app_setup() before creating the test's threads, causing queries to miss when delivering signals. It is difficult to create a regression test for this as the consequences are performance degradations rather than correctness, and these degradations only really show up at scale with hundreds of threads whose missing stacks are queried at once with no caching. Fixes #2037
-
Derek Bruening authored
Avoids name conflicts by renaming the LOG_xxx macros to have a DR_ prefix, so DR_LOG_xxx. Puts in place a compatibility CMake option DynamoRIO_LOG_COMPATIBILITY that requests the old LOG_xxx macros and automatically sets it if the client targets DR version 7.0.0 or older. Updates all non-core uses of LOG_xxx.
-
Derek Bruening authored
Given the time since the RC1 we're retroactively considering it to be an official release. The base version was bumped to 7.0 already in ad850c4c. Here we split the changelist. Additionally I added the missing page_drltrace page to match page_drstrace.
-
- 06 Mar, 2018 2 commits
-
-
Derek Bruening authored
Removes the incorrect removal of all itimers in signal_thread_exit(), which was disabling app itimers on detach. Adds a test to api.static_signal. Fixes #2871
-
Kevin Malachowski authored
As noted in the added code comment, there are points in time where it's possible that the app_sigaction is NULL for a signal. This PR makes us more defensive to avoid a crash on an internal unit test. Issue: #2114
-
- 05 Mar, 2018 7 commits
-
-
Kevin Malachowski authored
In environments where there are a lot of signals being delivered to threads of a process, there is possibly a race where one thread links/unlinks while another is waiting to do it themselves. With this commit, we have threads skip linking/unlinking if they notice another thread did this (after they have obtained the change_linking_lock). This fixes an ASSERT I'm hitting with an app: https://github.com/DynamoRIO/dynamorio/blob/9d9129a/core/link.c#L1896 Issue #2066
-
Kevin Malachowski authored
Previously, if we weren't able to take over all threads after a few retries we would have a debug-level assert but otherwise continue on with running the application. This can cause lots of correctness problems in the application, and it would be better to cleanly crash ahead of time rather than wait for an application crash to happen. Issue #2723
-
Derek Bruening authored
Because relocating can invoke an ifunc which accesses TLS, for UNIX we move loader_init() to after thread init. The custom delayed init function calling is moved back to privload finalization. The ELF TLS block setup for the primary thread is moved up to TLS block discovery time and is moved to after relocation (but before init function calling). Windows remains unchanged as it has other ordering requirements (i#338). Fixes #2751 Issue: #338
-
Derek Bruening authored
We don't want flaky tests to derail package deployment, so we disable test running for such builds. We've already run the tests for the same commit via regular master-push triggers: these package builds are coming from a cron trigger (Travis) or a tag addition (Appveyor), not a code change. Issue: #1967
-
Derek Bruening authored
Relaxes the burst_threads output further to handle non-determinism in the test which had been causing sporadic failures.
-
Derek Bruening authored
Yet another attempt to get Appveyor and Travis to upload files to the same GitHub Release, by using not only the same tag but the same name. Issue: #1967
-
Derek Bruening authored
Since Appveyor appears to clobber the GitHub Release name and description set by Travis, we set similar values for Appveyor. Sets the Appveyor deploy file to use the artifact name, as the path (with wildcards) failed. Issue: #1967
-
- 04 Mar, 2018 4 commits
-
-
Derek Bruening authored
Adds the proper path for our package files to be "artifacts" that can then be deployed to GitHub Releases. Issue: #1967
-
Derek Bruening authored
Adds package building in each Appveyor build. Adds force_update for Appveyor deployment to try and get it in the same GitHub Release as Travis. Issue: #1967
-
Derek Bruening authored
Fixes an error in ad850c4c where only the 64-bit package was deployed. However, it is not clear that Travis supports deployments from multiple parallel jobs, and it is also not clear how racy tagging and deploying is going to work. This is an attempt to see what happens: the 2nd tag may fail and abort its deploy. Sets the GitHub Release title and description. Fixes a git diff error on Appveyor tagged builds. Issue: #1967
-
Derek Bruening authored
Adds support for Travis builds to produce auto-published package files. Each job can create its own package file, using existing support in runsuite*.cmake and package.cmake with some additions here to enable and tweak that code. Longer-term we may want to use package.cmake instead and even make official builds on Travis (i#2861). Adds Travis deployment to Github Releases of produced packages files. The tag is "cronbuild-${VERSION_NUMBER}": e.g., "cronbuild-7.0.17592". Adds Appveyor tag-triggered deployment. Adds better support for 32-bit-only or 64-bit-only x86 package files by naming them differently and removing the drrun warnings on incomplete packages when missing the opposite bitwidth. Adds better build order handling to ensure release build is the default for tool files. Issue: #1967
-
- 02 Mar, 2018 1 commit
-
-
Derek Bruening authored
Eliminates the memory query loop in copy_frame_to_stack() which checks whether each part of the app stack is writable before copying over the signal frame. This loop grabs the global all_memory_areas lock and if that lookup misses it goes to a maps lookup. This has shown to cause noticeable contention. Instead we perform an overlap check for is_executable_area_writable followed by a TRY_EXCEPT safe write. Adds a new test linux.bad-signal-stack which tests this by setting up an unwritable alternate stack. It also tests checking for SA_ONSTACK, and we fix #2017 here to make that work, which is needed for a good test. The existing security-common.decode-bad-stack hits the is_executable_area_writable() case. Issue: #2214 Fixes #2017
-
- 01 Mar, 2018 1 commit
-
-
Derek Bruening authored
Fixes a Mac build error introduced by 3bc33154. Fixes a Mac test build error that shows up on newer toolchains. Issue: #975
-
- 28 Feb, 2018 1 commit
-
-
Derek Bruening authored
Adds a feature where a client library can request that the private loader complain if malloc & co. are called at any time other than process init or exit, to help clients that want to support being linked statically with the app. Because it has to be early, the feature is triggered by a variable declaration DR_DISALLOW_UNSAFE_STATIC. It can be overridden dynamically by a new API routine dr_allow_unsafe_static_behavior(). Fixes drcachesim to use placement new for its offline custom module data allocations. Issue: #975, #2006
-
- 27 Feb, 2018 1 commit
-
-
Derek Bruening authored
The trace header refactoring in aedf9be2 broke post-processing of legacy trace headers where the first timestamp precedes the first thread id. We fix that here. Issue: #2843
-
- 26 Feb, 2018 3 commits
-
-
Derek Bruening authored
Adds a new option -cpu_scheduling which schedules trace execution on simulated cores to match the new recorded cpu mappings. The cpu's are assigned to cores in a round-robin fashion, and each thread region is assigned to the core that owns the cpu in the thread region's header markers. Adds -cpu_scheduling to several tests with multiple threads. Adds the documentation for the new option. Fixes #2843
-
Derek Bruening authored
For tools that have many options, passing a long list of parameters is cumbersome, error-prone, and difficult to extend with newly added options. We change cache_simulator, tlb_simulator, and reuse_distance to use a struct of knobs instead. Tools with just a couple of options are left using parameters. Issue: #2006
-
Derek Bruening authored
Adds synchronization to avoid fewer than one thread per core in the tool.drcacheoff.burst_threads test, to eliminate flakiness in output matching.
-
- 24 Feb, 2018 1 commit
-
-
Derek Bruening authored
Adds a timestamp marker and a cpu marker to the trace buffer header for each thread's buffer unit output. The timestamp was already in the raw offline trace format, but now it is in the final trace for both offline and online as a new marker type. The cpu is completely new and specifies which core that thread executed on at the granularity of the buffer unit. Refactors the initial and per-output buffer headers to fix warts in the tracer: now the initial buffer's timestamp is from output time rather than thread init time; the initial header is more cleanly skipped for virt2phys; header uses are more normalized and easier to understand. Updates the basic_counts tool to separate these new scheduling marks from kernel transfer and other markers. Updates the corresponding documentation. A forthcoming change will update the cache simulator to schedule threads based on executed cores rather than a thread round-robin scheme. Issue: #2843
-
- 22 Feb, 2018 1 commit
-
-
Derek Bruening authored
Resets callback functions at exit to better support re-attach. Adds re-attach testing to the burst_threads and burst_thread*filter tests. Adds "firstglob" support to runmulti to post-process only one of the 4 re-attach traces to keep the tests simpler and faster. Adds testing of the thread filter callback being reset across re-attach by passing in a specific user param. Issue: #2175, #2820
-