Daniel Lemire's blog

, 4 min read

Catching sanitizer errors programmatically

3 thoughts on “Catching sanitizer errors programmatically”

  1. Oren Tirosh says:

    Using backtrace() would be a more realistic example.

    1. If you are interested in the location of the error in your program, you could use backtrace functions, indeed.

      My example illustrates a simple case where we want a description of the state of the program when an error happens. In my example, we know where the error happens a priori.

  2. M*USA-+ov says:

    Please be patient. I’m trying to express an idea from the hip and want to have fun and be innovative. I spent a lot of time on this topic so please don’t avoid me. Be more Austin than Boston. Maybe try coding this:

    Each piece of information can be represented for computational purposes with a single glyph or character. Take numbers for example, if I said, “Let P = 2 and NP = 11. The only difference would be the number of steps (time) and memory required to display one NP at a time in two cases.” But there’s no reason infinite numbers can’t each have a single processing unique. However, computation would require a fairly machine-readable library only. But having each number have a 1 or 0 representation and then a single representation only on the input makes more sense. The only step missing was the ingenuity of the programmer in separating P and NP. Suppose for example P is prime and NP is never prime including non-prime integers: P = NP false. So P = NP is true. But what is a prime number? If I had two teachers and four apples I could give each teacher two apples. If I had two apples I could give each teacher a piece. It seems more logical to us to specify as long as there is an equal division into two or more parts to call the number COMPOSITE. This makes the input composite and the output primitive. So how can we provide proof that this is possible. Well, consider the output of prime 11 as NP as a proof that NP is prime. The proof is very tedious but we are still talking about a computer that can quickly confirm that the proof is correct. We can even say in imagination, use the number of primes that we can invert and invert on the right side to explain the figure equal to the difference between 2 and 11.
    The proof that the machine emits divides the number into left and right correct answers and identifies prime 10s and a solution to the subsum problem that returns only a subset that includes zero when the number is prime.

    The formula is prime time 2 + next prime, then prime + next prime as a product, minus the prime equals the prime that starts with 11… for example
    3×2=6, 6+5=11, 3+5=8*2=16, 16-5=11 left prime 2 right prime 11
    Finite operator -5 so
    5×2=10, 10+3=13, 5+3=8, 8*2=16-3=13 left prime 5 right prime 13
    Final operator -3 continues
    7×2=14, 14+3=17, 7+3=10, 10*2=20, 20-3=17 left 7 right 7 or 17
    operator -3
    reaching a peak…. +3, +3, +5 for -11 and +11… equal to zero is 6 inverted occurrences and the right side above the character then becomes a nine.