Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix undefined in core-test and printf-test #1345

Merged
merged 3 commits into from
Oct 8, 2019
Merged

Commits on Oct 8, 2019

  1. Fix undefined in core-test

    Fixes "reference binding to null pointer" in BufferTest.Ctor
    
    buffer.operator[] attempts to return a reference to `buffer.ptr_[0]` when `ptr_`
    in `mock_buffer<int> buffer` is null.
    orivej committed Oct 8, 2019
    Configuration menu
    Copy the full SHA
    5e48953 View commit details
    Browse the repository at this point in the history
  2. Fix undefined in printf-test

    Fixes "signed integer overflow" in PrintfTest.Length
    
    This occurs in `TestLength<long long>("ll")`, since its minimum value minus one
    does not fit in long long.
    orivej committed Oct 8, 2019
    Configuration menu
    Copy the full SHA
    1bb5654 View commit details
    Browse the repository at this point in the history
  3. Fix undefined in printf %0$

    Printf counts arguments from 1.
    
    Fixes "shift exponent -4 is negative" in PrintfTest.InvalidArgIndex.
    
    `do_get` is called with index -1 when `basic_printf_context.arg` is called with
    id 4294967295 when basic_printf_context::get_arg subtracts 1 from arg_index 0 in
    the format string "%0$d".
    orivej committed Oct 8, 2019
    Configuration menu
    Copy the full SHA
    66936d3 View commit details
    Browse the repository at this point in the history