Skip to content
This repository has been archived by the owner on May 4, 2018. It is now read-only.
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: joyent/libuv
base: 140c863ff096
Choose a base ref
...
head repository: joyent/libuv
compare: f166d6d7055b
Choose a head ref
  • 1 commit
  • 1 file changed
  • 1 contributor

Commits on Dec 22, 2013

  1. osx: Fix a possible segfault in uv__io_poll

    In our build infrastructure, I've seen a lot of segfaults recently that
    were all only happening on OSX. Upon inspecting the coredumps, it
    appearded that all segfaults happened at the same instruction, and upon
    translating the assembly back to the source, I found that an array could
    be indexed with a -1 index before the index was checked to be not -1.
    
    As concrete evidence, here is the situation that I found caused the
    segfault.  The instruction in question along with the relevant register
    values was:
    
        mov    (%r8,%r15,8),%r12
    
        r8  = 0x7fb0ba800000
        r15 = 0xffffffffffffffff
    
        r8 + r15 * 8 == 0x7fb0ba7ffff8
    
    It appears that the base of loop->watchers was page aligned, and by
    going back one word I guess that the page wasn't mapped, causing our
    segfaults.
    alexcrichton authored and indutny committed Dec 22, 2013
    Copy the full SHA
    f166d6d View commit details
    Browse the repository at this point in the history