)]}'
{
  "commit": "952e9eb0866bc2061b671e8d6c90cae275eda6bd",
  "tree": "1a6fd63119783ddb62d9faaec1e57489b707fc18",
  "parents": [
    "8bd27182c505cdc8031ab23fea5d1dccb6b7405a"
  ],
  "author": {
    "name": "Yabin Cui",
    "email": "yabinc@google.com",
    "time": "Tue Nov 24 17:24:06 2015 -0800"
  },
  "committer": {
    "name": "Yabin Cui",
    "email": "yabinc@google.com",
    "time": "Tue Nov 24 17:24:06 2015 -0800"
  },
  "message": "Don\u0027t use __thread in __cxa_thread_finalize().\n\nCurrently we use __thread variable to store thread_local_dtors,\nwhich makes tsan test fork_atexit.cc hang. The problem is as below:\nThe main thread creates a worker thread, the worker thread calls\npthread_exit() -\u003e __cxa_thread_finalize() -\u003e __emutls_get_address()\n-\u003e pthread_once(emutls_init) -\u003e emutls_init().\nThen the main thread calls fork(), the child process cals\nexit() -\u003e __cxa_thread_finalize() -\u003e __emutls_get_address()\n-\u003e pthread_once(emutls_init).\nSo the child process is waiting for pthread_once(emutls_init)\nto finish which will never occur.\n\nIt might be the test\u0027s fault because POSIX standard says if a\nmulti-threaded process calls fork(), the new process may only\nexecute async-signal-safe operations until exec functions are\ncalled. And exit() is not async-signal-safe. But we can make\nbionic more reliable by not using __thread in\n__cxa_thread_finalize().\n\nBug: 25392375\nChange-Id: Ife403dd7379dad8ddf1859c348c1c0adea07afb3\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "0e427d346290416c5ec85237053e3fd063fd984d",
      "old_mode": 33188,
      "old_path": "libc/bionic/__cxa_thread_atexit_impl.cpp",
      "new_id": "0e903b9d7687613cd719bf8d79ebbbb79e66d6a9",
      "new_mode": 33188,
      "new_path": "libc/bionic/__cxa_thread_atexit_impl.cpp"
    },
    {
      "type": "modify",
      "old_id": "d5d62a787bf64f0b5b7540cad06f6c482c6ca3d8",
      "old_mode": 33188,
      "old_path": "libc/bionic/pthread_internal.h",
      "new_id": "f96e9d27136357977fd4eb9d06e8e9ef5f58ff2b",
      "new_mode": 33188,
      "new_path": "libc/bionic/pthread_internal.h"
    }
  ]
}
