)]}'
{
  "log": [
    {
      "commit": "7484c21c4c352a2200d94939fabc10d1bd3f0723",
      "tree": "fe089ec40970a76f11107534632b1fc5789660ed",
      "parents": [
        "b0e8c565a622b5519e03d4416b0b5b1a5f20d7f5"
      ],
      "author": {
        "name": "Elliott Hughes",
        "email": "enh@google.com",
        "time": "Thu Feb 02 02:41:38 2017 +0000"
      },
      "committer": {
        "name": "Elliott Hughes",
        "email": "enh@google.com",
        "time": "Thu Feb 02 02:41:38 2017 +0000"
      },
      "message": "Revert \"Remove the global thread list.\"\n\nThis reverts commit b0e8c565a622b5519e03d4416b0b5b1a5f20d7f5.\n\nBreaks swiftshader (http:/b/34883464).\n\nChange-Id: I7b21193ba8a78f07d7ac65e41d0fe8516940a83b\n"
    },
    {
      "commit": "b0e8c565a622b5519e03d4416b0b5b1a5f20d7f5",
      "tree": "8362f2754276b72e79a652885be7379127ca6e07",
      "parents": [
        "fb07c36bc061db4ca5d8348ff6bc1e60b6c53191"
      ],
      "author": {
        "name": "Elliott Hughes",
        "email": "enh@google.com",
        "time": "Wed Jan 04 14:12:54 2017 -0800"
      },
      "committer": {
        "name": "Elliott Hughes",
        "email": "enh@google.com",
        "time": "Sat Jan 07 14:16:46 2017 -0800"
      },
      "message": "Remove the global thread list.\n\nAnother release, another attempt to fix this bug.\n\nThis change affects pthread_detach, pthread_getcpuclockid,\npthread_getschedparam/pthread_setschedparam, pthread_join, and pthread_kill:\ninstead of returning ESRCH when passed an invalid pthread_t, they\u0027ll now SEGV.\n\nNote that this doesn\u0027t change behavior as much as you might think: the old\nlookup only held the global thread list lock for the duration of the lookup,\nso there was still a race between that and the dereference in the caller,\ngiven that callers actually need the tid to pass to some syscall or other,\nand sometimes update fields in the pthread_internal_t struct too.\n\nWe can\u0027t check thread-\u003etid against 0 to see whether a pthread_t is still\nvalid because a dead thread gets its thread struct unmapped along with its\nstack, so the dereference isn\u0027t safe.\n\nTaking the affected functions one by one:\n\n* pthread_getcpuclockid and pthread_getschedparam/pthread_setschedparam\n  should be fine. Unsafe calls to those seem highly unlikely.\n\n* Unsafe pthread_detach callers probably want to switch to\n  pthread_attr_setdetachstate instead, or using pthread_detach(pthread_self())\n  from the new thread\u0027s start routine rather than doing the detach in the\n  parent.\n\n* pthread_join calls should be safe anyway, because a joinable thread won\u0027t\n  actually exit and unmap until it\u0027s joined. If you\u0027re joining an\n  unjoinable thread, the fix is to stop marking it detached. If you\u0027re\n  joining an already-joined thread, you need to rethink your design.\n\n* Unsafe pthread_kill calls aren\u0027t portably fixable. (And are obviously\n  inherently non-portable as-is.) The best alternative on Android is to\n  use pthread_gettid_np at some point that you know the thread to be alive,\n  and then call kill/tgkill directly. That\u0027s still not completely safe\n  because if you\u0027re too late, the tid may have been reused, but then your\n  code is inherently unsafe anyway.\n\nIf we find too much code is still broken, we can come back and disable\nthe global thread list lookups for anything targeting \u003e\u003d O and then have\nanother go at really removing this in P...\n\nBug: http://b/19636317\nTest: N6P boots, bionic tests pass\nChange-Id: Ia92641212f509344b99ee2a9bfab5383147fcba6\n"
    },
    {
      "commit": "673b15e4ee2c6d99b150aedddc0f389e29f98e1b",
      "tree": "edc101b54c689960bdf1262e6378b21082d3e277",
      "parents": [
        "4149dc944bbe3c5f1c14fc998106975e68bdd6bf"
      ],
      "author": {
        "name": "Yabin Cui",
        "email": "yabinc@google.com",
        "time": "Thu Mar 19 14:19:19 2015 -0700"
      },
      "committer": {
        "name": "Yabin Cui",
        "email": "yabinc@google.com",
        "time": "Mon Mar 23 19:03:49 2015 -0700"
      },
      "message": "Let g_thread_list_lock only protect g_thread_list.\n\nAs glibc/netbsd don\u0027t protect access to thread struct members by a global\nlock, we don\u0027t want to do it either. This change reduces the\nresponsibility of g_thread_list_lock to only protect g_thread_list.\n\nBug: 19636317\nChange-Id: I897890710653dac165d8fa4452c7ecf74abdbf2b\n"
    },
    {
      "commit": "58cf31b50699ed9f523de38c8e943f3bbd1ced9e",
      "tree": "258ba808074bd047a94df452a4e465db66136797",
      "parents": [
        "e86a86f9f24df7028d2596c69ff008cf88e039e4"
      ],
      "author": {
        "name": "Yabin Cui",
        "email": "yabinc@google.com",
        "time": "Fri Mar 06 17:23:53 2015 -0800"
      },
      "committer": {
        "name": "Yabin Cui",
        "email": "yabinc@google.com",
        "time": "Thu Mar 12 21:39:49 2015 -0700"
      },
      "message": "Make pthread join_state not protected by g_thread_list_lock.\n\n1. Move the representation of thread join_state from pthread.attr.flag\n   to pthread.join_state. This clarifies thread state change.\n2. Use atomic operations for pthread.join_state. So we don\u0027t need to\n   protect it by g_thread_list_lock. g_thread_list_lock will be reduced\n   to only protect g_thread_list or even removed in further changes.\n\nBug: 19636317\nChange-Id: I31fb143a7c69508c7287307dd3b0776993ec0f43\n"
    },
    {
      "commit": "8cf1b305670123aed7638d984ca39bfd22388440",
      "tree": "f8fc12a882822ca1ba41b68d84414e252faade9c",
      "parents": [
        "c631bb215e29981222f19c092ded49c7c1f15845"
      ],
      "author": {
        "name": "Yabin Cui",
        "email": "yabinc@google.com",
        "time": "Wed Dec 03 21:36:24 2014 -0800"
      },
      "committer": {
        "name": "Yabin Cui",
        "email": "yabinc@google.com",
        "time": "Fri Dec 19 16:05:29 2014 -0800"
      },
      "message": "Use mmap to create the pthread_internal_t\n\nAdd name to mmaped regions.\nAdd pthread benchmark code.\nAllocate pthread_internal_t on regular stack.\n\nBug: 16847284\nChange-Id: Id60835163bb0d68092241f1a118015b5a8f85069\n"
    },
    {
      "commit": "877ec6d90418ff1d6597147d355a2229fdffae7e",
      "tree": "e475221a7fbff1564ad37548e920333c49cc5873",
      "parents": [
        "f246c589d66e5dc0e3cddc3c37261fb0e3fc67e9"
      ],
      "author": {
        "name": "Elliott Hughes",
        "email": "enh@google.com",
        "time": "Fri Nov 15 17:40:18 2013 -0800"
      },
      "committer": {
        "name": "Elliott Hughes",
        "email": "enh@google.com",
        "time": "Mon Nov 18 19:48:11 2013 -0800"
      },
      "message": "Fix pthread_join.\n\nLet the kernel keep pthread_internal_t::tid updated, including\nacross forks and for the main thread. This then lets us fix\npthread_join to only return after the thread has really exited.\n\nAlso fix the thread attributes of the main thread so we don\u0027t\nunmap the main thread\u0027s stack (which is really owned by the\ndynamic linker and contains things like environment variables),\nwhich fixes crashes when joining with an exited main thread\nand also fixes problems reported publicly with accessing environment\nvariables after the main thread exits (for which I\u0027ve added a new\nunit test).\n\nIn passing I also fixed a bug where if the clone(2) inside\npthread_create(3) fails, we\u0027d unmap the child\u0027s stack and TLS (which\ncontains the mutex) and then try to unlock the mutex. Boom! It wasn\u0027t\nuntil after I\u0027d uploaded the fix for this that I came across a new\npublic bug reporting this exact failure.\n\nBug: 8206355\nBug: 11693195\nBug: https://code.google.com/p/android/issues/detail?id\u003d57421\nBug: https://code.google.com/p/android/issues/detail?id\u003d62392\nChange-Id: I2af9cf6e8ae510a67256ad93cad891794ed0580b\n"
    },
    {
      "commit": "0f020d18b138e24b1fe34074808e07ac412f35a4",
      "tree": "75e84d43c82a0e8013d7b1c34d4da1fec64e116c",
      "parents": [
        "6a44d2271f372d0c65b05a5d3377bd00ce92824e"
      ],
      "author": {
        "name": "msg555",
        "email": "msg555@gmail.com",
        "time": "Thu Jun 06 14:59:28 2013 -0400"
      },
      "committer": {
        "name": "Elliott Hughes",
        "email": "enh@google.com",
        "time": "Wed Jun 12 17:30:58 2013 -0700"
      },
      "message": "Handles spurious wake-ups in pthread_join()\n\nRemoved \u0027join_count\u0027 from pthread_internal_t and switched to using the flag\nPTHREAD_ATTR_FLAG_JOINED to indicate if a thread is being joined. Combined with\na switch to a while loop in pthread_join, this fixes spurious wake-ups but\nprevents a thread from being joined multiple times. This is fine for\ntwo reasons:\n\n1) The pthread_join specification allows for undefined behavior when multiple\n   threads try to join a single thread.\n\n2) There is no thread safe way to allow multiple threads to join a single\n   thread with the pthread interface.  The second thread calling pthread_join\n   could be pre-empted until the thread is destroyed and its handle reused for\n   a different thread.  Therefore multi-join is always an error.\n\nBug: https://code.google.com/p/android/issues/detail?id\u003d52255\nChange-Id: I8b6784d47620ffdcdbfb14524e7402e21d46c5f7\n"
    },
    {
      "commit": "9d23e04c43dbb8480bea8be28b8a2f37423bec49",
      "tree": "e403288cf01ce40d6f330da09a317c7ad6dc2cb2",
      "parents": [
        "081318e3550b1a8d8384d98d7c94527681691120"
      ],
      "author": {
        "name": "Elliott Hughes",
        "email": "enh@google.com",
        "time": "Fri Feb 15 19:21:51 2013 -0800"
      },
      "committer": {
        "name": "Elliott Hughes",
        "email": "enh@google.com",
        "time": "Tue Feb 19 12:21:41 2013 -0800"
      },
      "message": "Fix pthreads functions that should return ESRCH.\n\nimgtec pointed out that pthread_kill(3) was broken, but most of the\nother functions that ought to return ESRCH for invalid/exited threads\nwere equally broken.\n\nChange-Id: I96347f6195549aee0c72dc39063e6c5d06d2e01f\n"
    }
  ]
}
