Skip to content
Permalink
Branch: master
Commits on Oct 12, 2019
  1. arena: fix out-of-bounds access from the arena chunk resize.

    Snaipe committed Oct 12, 2019
    The arena code makes allocation entries resize themselves to fit the
    allocated data as closely as possible. In some cases, the remaining size
    would not be enough for the next entry metadata to be allocated, which
    would of course cause a segmentation fault when trying to initialize it.
    
    To address that, we initialize a sentinel at the end of the arena, which
    takes the form of an allocation entry of size 0. As a bonus, this makes
    iteration more straightforward as it becomes sufficient to compare the
    current entry pointer to the address of the sentinel.
Commits on Sep 19, 2019
Commits on Sep 18, 2019
  1. elf: special-case handling of main object

    Snaipe committed Sep 18, 2019
    Some platforms would report the name of the first object as the original
    binary executable path, while others report "boxfort-worker", since we
    pass a modified argv0 to the workers. To avoid this, we special case the
    first entry and use an empty soname.
  2. asm: s/arm64/aarch64 to please meson, too

    Snaipe committed Sep 18, 2019
Commits on Sep 17, 2019
  1. asm: s/i386/x86 to please meson

    Snaipe committed Sep 17, 2019
Commits on Sep 15, 2019
  1. buildsys: use meson as build system

    Snaipe committed Sep 15, 2019
Commits on Oct 30, 2018
  1. exe,elf: fix main symbol resolution

    Snaipe committed Oct 29, 2018
    The dynamic symbol table search for main yielded the address of the PLT
    stub on clang, which in turn is not used by the entry point. This was
    causing Criterion to fork-bomb the user when running test workers, as
    they would spawn a new runner every time.
    
    Users are advised to use a check mechanism, like setting an environment
    variable, and abort immediately when seeing this environment variable
    in the runner's main function.
Commits on May 1, 2018
  1. travis: disable ARM testing for the moment

    Snaipe committed May 1, 2018
  2. asm: added initial support for arm64.

    Snaipe committed Jan 10, 2018
  3. asm: make stack non-executable

    Snaipe committed May 1, 2018
    This patch makes boxfort stop asking for an executable stack, which is
    the default when compiling assembly bits. This was not too much of a
    problem previously, but some platforms, like WSL, does not support
    executable stacks yet, which forced users to clear the executable stack
    bit in the generated ELFs.
Commits on Apr 30, 2018
  1. travis: fixed missing pip invocation by using pip2

    Snaipe committed Apr 30, 2018
  2. sandbox,posix: use introspection to iterate file descriptors

    Snaipe committed Apr 30, 2018
    We previously iterated on every file descriptor between 0 and the fd
    rlimit, which caused a very noticeable slowdown on some platforms.
    
    See Snaipe/Criterion#248.
  3. arena: change 32-bit mmap_max to 0x80000000

    Snaipe committed Apr 30, 2018
    32-bit windows sets kernel space above that value, so it does not make
    sense to try to allocate things up to 0xa0000000.
  4. arena: check for mincore availability, fallback to msync otherwise

    Snaipe committed Apr 30, 2018
    The map checking code is still a bit fragile, but with this change we
    should avoid any surprise with systems not providing mincore. We also
    disable mincore altogether on OS X, because it seems to not work as we
    expect.
Commits on Feb 16, 2017
  1. misc: fixed missing line feed on bug() message

    Snaipe committed Feb 16, 2017
  2. arena: fixed mincore error check on OS X

    Snaipe committed Feb 16, 2017
    mincore(2) on OS X sets errno to EINVAL instead of ENOMEM when the
    passed memory region is not mapped, so we put in a special case
    for Apple platforms only.
Commits on Feb 15, 2017
  1. arena: fixed the page mapping check

    Snaipe committed Feb 15, 2017
    The old code was based on msync(addr, page_size, 0), which tested
    whether a page was mapped at addr or not. This behaviour however was
    undocumented and fragile; and eventually broke on BashForWindows.
    
    The new method now uses mincore(2) to achieve a similar functionality,
    without resorting to passing MS_(A)SYNC to msync and potentially having
    side effects.
Commits on Jan 20, 2017
Commits on Dec 12, 2016
  1. addr: Fixed unsafe handling of 32-bit address slides

    Snaipe committed Dec 12, 2016
Commits on Nov 23, 2016
  1. windows: Wait for debugger instead of suspending thread for .suspende…

    Snaipe committed Nov 23, 2016
    …d property
  2. i386,x64: Added non-unwinding setjmp implementations for windows.

    Snaipe committed Nov 22, 2016
Commits on Nov 22, 2016
  1. windows: Use the current PID rather than a box id for map names

    Snaipe committed Nov 22, 2016
Commits on Nov 20, 2016
  1. exe-elf: Fixed nonstandard usage of void* arithmetic

    Snaipe committed Nov 20, 2016
Commits on Nov 19, 2016
  1. addr: Fixed wrong denormalization on OS X due to non-resetting segmen…

    Snaipe committed Nov 19, 2016
    …t index
  2. addr: Fixed various issues with 43dceb2

    Snaipe committed Nov 19, 2016
  3. addr: Fixed address denormalization not taking segment gaps into account

    Snaipe committed Nov 19, 2016
    The old code assumed that image contents were loaded contiguously. This
    may be false in practice, when for instance the executable segment is
    loaded at a different base than the data segment, leaving a random gap
    in between (courtesy of kernel ASLR).
    
    We fix this behaviour by taking the segment index into account when
    normalizing and denormalizing addresses.
    
    Furthermore, this commit now makes the ELF code check for the image
    boundaries. Before that, due to a limitation of the link_map interface,
    it only compared the image base with the address and supposed that the
    closest lower base was the image the address belonged to.
    
    Fixes Snaipe/Criterion#178.
    
    Signed-off-by: Franklin "Snaipe" Mathieu <snaipe@diacritic.io>
Commits on Nov 1, 2016
  1. readme: Updated links to diacritic

    Snaipe committed Nov 1, 2016
Commits on Oct 22, 2016
  1. gprof: Gmon files no longer share the same filename

    Snaipe committed Oct 22, 2016
Older
You can’t perform that action at this time.