[DynInst_API:] [dyninst/dyninst] f88802: proccontrol: scrub newly created threads that fail...


Date: Fri, 02 Dec 2016 06:14:17 -0800
From: John Detter <jdetter@xxxxxxxx>
Subject: [DynInst_API:] [dyninst/dyninst] f88802: proccontrol: scrub newly created threads that fail...
  Branch: refs/heads/att_syntax
  Home:   https://github.com/dyninst/dyninst
  Commit: f88802f0737f4cf2a684cb2528f2c3ae0addc393
      https://github.com/dyninst/dyninst/commit/f88802f0737f4cf2a684cb2528f2c3ae0addc393
  Author: Josh Stone <jistone@xxxxxxxxxx>
  Date:   2016-11-16 (Wed, 16 Nov 2016)

  Changed paths:
    M proccontrol/src/process.C

  Log Message:
  -----------
  proccontrol: scrub newly created threads that fail to attach

If `int_thread::createThread` failed to actually attach to the thread,
it was leaving the thread object in the process in the `neonatal` state.
This failed assertions later when trying to stop all of the process's
threads, as it would have handler `stopped` and generator `neonatal`.

Now when a thread attach fails, it is set to `errorstate` and removed
from the active thread pools.  The assumption is that this thread simply
exited before we could attach, but we can't be sure of that without
having access to the ptrace return code (`ESRCH`).


  Commit: 116fccd72fd6ebcd16a091ea2196c1422ea4c15e
      https://github.com/dyninst/dyninst/commit/116fccd72fd6ebcd16a091ea2196c1422ea4c15e
  Author: Bill Williams <bill@xxxxxxxxxxx>
  Date:   2016-11-17 (Thu, 17 Nov 2016)

  Changed paths:
    M dyninstAPI/src/inst-power.C

  Log Message:
  -----------
  PPC build fixed


  Commit: f2c39832a32be92c1439b34aafeafbaf80e24f83
      https://github.com/dyninst/dyninst/commit/f2c39832a32be92c1439b34aafeafbaf80e24f83
  Author: Bill Williams <bill@xxxxxxxxxxx>
  Date:   2016-11-17 (Thu, 17 Nov 2016)

  Changed paths:
    M parseAPI/src/IA_powerDetails.C
    M symtabAPI/src/Object-elf.C

  Log Message:
  -----------
  Stubs for fixing PPC binaries without OPD sections


  Commit: 2a1f45301ef6c1a860a9d8e93b9366d4a429eef8
      https://github.com/dyninst/dyninst/commit/2a1f45301ef6c1a860a9d8e93b9366d4a429eef8
  Author: Matt Morehouse <mm@xxxxxxxxxxx>
  Date:   2016-11-17 (Thu, 17 Nov 2016)

  Changed paths:
    M proccontrol/doc/proccontrol.docx
    M proccontrol/doc/proccontrol.pdf

  Log Message:
  -----------
  Document some of the ProcControlAPI options in PlatFeatures.h.


  Commit: 80111056ea99daeac08bb211caa74734cd6394ac
      https://github.com/dyninst/dyninst/commit/80111056ea99daeac08bb211caa74734cd6394ac
  Author: Josh Stone <jistone@xxxxxxxxxx>
  Date:   2016-11-18 (Fri, 18 Nov 2016)

  Changed paths:
    M proccontrol/src/process.C

  Log Message:
  -----------
  proccontrol: fix double-increment while erasing a dead process

In the attach loop over waitfor_startup(), processes which fail are
erased from the set.  However, the iterator was getting incremented
again, which will skip the next process or even cause undefined behavior
if already at the end of the list.

With GCC 6.2.1, that UB manifested as an infinite loop on a self-
referential rbtree node.

The simple solution is to `continue` the loop after `erase(i++)`, as is
done in many other places with this same pattern.


  Commit: d7e310e4b1bdf7eee4dafab1553a89d6ea79717d
      https://github.com/dyninst/dyninst/commit/d7e310e4b1bdf7eee4dafab1553a89d6ea79717d
  Author: Josh Stone <jistone@xxxxxxxxxx>
  Date:   2016-11-21 (Mon, 21 Nov 2016)

  Changed paths:
    M proccontrol/src/process.C

  Log Message:
  -----------
  proccontrol: fix another process erasure during attach

If a process initially failed to attach threads, a `pthrd_printf` was
indicating that it would try again, but the process was getting erased
from the set while incorrectly causing the iterator to double-increment.

Now the messages about "will try again" and "now an error" are changed
to simply report an immediate error, and it continus the loop after
process erasure to avoid incrementing the iterator again.


  Commit: 4b072133568eb09ce5c1534df3026c6c91353b4c
      https://github.com/dyninst/dyninst/commit/4b072133568eb09ce5c1534df3026c6c91353b4c
  Author: Itaru Kitayama <itaru.kitayama@xxxxxxxx>
  Date:   2016-11-22 (Tue, 22 Nov 2016)

  Changed paths:
    M symtabAPI/src/relocationEntry-elf-aarch64.C

  Log Message:
  -----------
  As reported by Will on the list,

https://www-auth.cs.wisc.edu/lists/dyninst-api/2015/msg00382.shtml

For the v9.2.0 release to be built on arm64, dyninst needs to be
aware of the namge changes.


  Commit: abf2ce4517a372273a7123e13f422623f20ff0a4
      https://github.com/dyninst/dyninst/commit/abf2ce4517a372273a7123e13f422623f20ff0a4
  Author: Peter Foley <pefoley2@xxxxxxxxxxx>
  Date:   2016-11-24 (Thu, 24 Nov 2016)

  Changed paths:
    M dyninstAPI/src/Relocation/Transformers/Movement-adhoc.C
    M instructionAPI/src/InstructionDecoder-aarch64.C
    M parseThat/src/dyninstCore.C
    M symtabAPI/src/emitElf.C

  Log Message:
  -----------
  fix warnings under lto


  Commit: bfe13a8b92646efe377ec033e240b612109aac83
      https://github.com/dyninst/dyninst/commit/bfe13a8b92646efe377ec033e240b612109aac83
  Author: Matt Morehouse <mm@xxxxxxxxxxx>
  Date:   2016-11-28 (Mon, 28 Nov 2016)

  Changed paths:
    M cmake/shared.cmake
    M cmake/warnings.cmake
    M dynC_API/src/C.y
    M dynC_API/src/dynC.tab.C
    M dynC_API/src/dynC.tab.h
    M dyninstAPI/src/Relocation/Transformers/Movement-adhoc.C
    M instructionAPI/src/InstructionDecoder-aarch64.C
    M parseThat/src/dyninstCore.C
    M symtabAPI/src/Object-elf.C
    M symtabAPI/src/emitElf.C

  Log Message:
  -----------
  Merge branch 'master' of https://github.com/dyninst/dyninst into proccontrol/doc/tracking


  Commit: 13a07e2f732a9474ba6b5359a8e27906ab71d548
      https://github.com/dyninst/dyninst/commit/13a07e2f732a9474ba6b5359a8e27906ab71d548
  Author: Matt Morehouse <mm@xxxxxxxxxxx>
  Date:   2016-11-28 (Mon, 28 Nov 2016)

  Changed paths:
    M proccontrol/doc/proccontrol.docx
    M proccontrol/doc/proccontrol.pdf

  Log Message:
  -----------
  Revised ProcControlAPI platform-specific feature documentation.


  Commit: 657f866c6ca4d0db1d8808268aecaccbc911ff70
      https://github.com/dyninst/dyninst/commit/657f866c6ca4d0db1d8808268aecaccbc911ff70
  Author: Bill Williams <wwilliam47@xxxxxxxxx>
  Date:   2016-11-29 (Tue, 29 Nov 2016)

  Changed paths:
    M proccontrol/doc/proccontrol.docx
    M proccontrol/doc/proccontrol.pdf

  Log Message:
  -----------
  Merge pull request #260 from dyninst/proccontrol/doc/tracking

Document some of the ProcControlAPI options in PlatFeatures.h.


  Commit: 99e8b9216b9e555563185391e4fd18256ab783d6
      https://github.com/dyninst/dyninst/commit/99e8b9216b9e555563185391e4fd18256ab783d6
  Author: Bill Williams <wwilliam47@xxxxxxxxx>
  Date:   2016-11-29 (Tue, 29 Nov 2016)

  Changed paths:
    M symtabAPI/src/relocationEntry-elf-aarch64.C

  Log Message:
  -----------
  Merge pull request #273 from ikitayama/myv9.2.0

Compiling DynInst v9.2.0 on arm64


  Commit: eea25e40d3ee2ec3bab3252b7d5731c9130d1ddb
      https://github.com/dyninst/dyninst/commit/eea25e40d3ee2ec3bab3252b7d5731c9130d1ddb
  Author: John Detter <jdetter@xxxxxxxx>
  Date:   2016-11-29 (Tue, 29 Nov 2016)

  Changed paths:
    M common/h/entryIDs.h
    M common/src/arch-x86.C

  Log Message:
  -----------
  Fixes for all but one of Nathan's x86 issues.


  Commit: f74a535845c7b66d239e29acbbf8fc2a9462b195
      https://github.com/dyninst/dyninst/commit/f74a535845c7b66d239e29acbbf8fc2a9462b195
  Author: John Detter <jdetter@xxxxxxxx>
  Date:   2016-11-29 (Tue, 29 Nov 2016)

  Changed paths:
    M dataflowAPI/src/stackanalysis.C
    M dyninstAPI/src/BPatch_addressSpace.C
    M dyninstAPI/src/BPatch_type.C
    M dyninstAPI/src/function.C
    M dyninstAPI/src/image.C
    M proccontrol/src/DecoderWindows.C

  Log Message:
  -----------
  Removed references to nullptr


  Commit: d2f0f1051e5caf605471fa19532334fcce9bb508
      https://github.com/dyninst/dyninst/commit/d2f0f1051e5caf605471fa19532334fcce9bb508
  Author: John Detter <jdetter@xxxxxxxx>
  Date:   2016-11-29 (Tue, 29 Nov 2016)

  Changed paths:
    M dataflowAPI/src/stackanalysis.C
    M dyninstAPI/src/BPatch_addressSpace.C
    M dyninstAPI/src/BPatch_type.C
    M dyninstAPI/src/function.C
    M dyninstAPI/src/image.C
    M dyninstAPI/src/inst-power.C
    M parseAPI/src/IA_powerDetails.C
    M proccontrol/src/DecoderWindows.C
    M symtabAPI/src/Object-elf.C

  Log Message:
  -----------
  Merge pull request #277 from dyninst/release9.2/fixes/ppc-fixes

Cleanup ppc (and old gcc) issues


  Commit: f86e3c2ea2e9c8a11a13b42b2b60438c53e597b5
      https://github.com/dyninst/dyninst/commit/f86e3c2ea2e9c8a11a13b42b2b60438c53e597b5
  Author: Josh Stone <jistone@xxxxxxxxxx>
  Date:   2016-11-29 (Tue, 29 Nov 2016)

  Changed paths:
    M common/src/linuxKludges.C

  Log Message:
  -----------
  common: use ptrace if yama blocked process_vm_readv/writev

Having sysctl kernel.yama.ptrace_scope=1, one may only call ptrace
attach on direct descendants.  The same restriction is also checked for
`process_vm_readv`/`writev` and certain procfs files.  However, if an
intermediate parent process already exited, we could end up with a
grandchild that we're still ptracing but isn't our descendant, so we
can't use the `process_vm` functions anymore -> `EPERM`.

We already had a fallback here for `EFAULT`, to just use `ptrace` memory
access, so use the same fallback after `EPERM` too.

Fixes #274.


  Commit: 6ccfab4766a02686dbf083b4c8dee1ac39a405cd
      https://github.com/dyninst/dyninst/commit/6ccfab4766a02686dbf083b4c8dee1ac39a405cd
  Author: Josh Stone <cuviper@xxxxxxxxx>
  Date:   2016-11-30 (Wed, 30 Nov 2016)

  Changed paths:
    M proccontrol/src/process.C

  Log Message:
  -----------
  Merge pull request #259 from cuviper/scrub-failed-createThread

proccontrol: scrub newly created threads that fail to attach


  Commit: e12519599272cde9546bcd892477bc68a0edcad0
      https://github.com/dyninst/dyninst/commit/e12519599272cde9546bcd892477bc68a0edcad0
  Author: Josh Stone <cuviper@xxxxxxxxx>
  Date:   2016-11-30 (Wed, 30 Nov 2016)

  Changed paths:
    M proccontrol/src/process.C

  Log Message:
  -----------
  Merge pull request #261 from cuviper/procs-erase-inc

proccontrol: fix double-increment while erasing a dead process


  Commit: d8807bc88d1bd739ead169458aca54d9354e4bdc
      https://github.com/dyninst/dyninst/commit/d8807bc88d1bd739ead169458aca54d9354e4bdc
  Author: Josh Stone <cuviper@xxxxxxxxx>
  Date:   2016-11-30 (Wed, 30 Nov 2016)

  Changed paths:
    M common/src/linuxKludges.C

  Log Message:
  -----------
  Merge pull request #280 from cuviper/yama-process_vm_rw

common: use ptrace if yama blocked process_vm_readv/writev


  Commit: 34f746aca366291930eededea006ecdcd538ec4f
      https://github.com/dyninst/dyninst/commit/34f746aca366291930eededea006ecdcd538ec4f
  Author: Matt Morehouse <mm@xxxxxxxxxxx>
  Date:   2016-12-01 (Thu, 01 Dec 2016)

  Changed paths:
    M dataflowAPI/src/stackanalysis.C

  Log Message:
  -----------
  Analyze all blocks at least once in fixpoint.


  Commit: f31852b370d36ca512f0c20137ccbc8a7f631eb9
      https://github.com/dyninst/dyninst/commit/f31852b370d36ca512f0c20137ccbc8a7f631eb9
  Author: Matt Morehouse <mm@xxxxxxxxxxx>
  Date:   2016-12-01 (Thu, 01 Dec 2016)

  Changed paths:
    M dataflowAPI/src/stackanalysis.C

  Log Message:
  -----------
  Avoid unnecessary block revisits in StackAnalyis.


  Commit: 0f8e88cb98e345d71fba3aa6ab80b949a304a200
      https://github.com/dyninst/dyninst/commit/0f8e88cb98e345d71fba3aa6ab80b949a304a200
  Author: morehouse <mm@xxxxxxxxxxx>
  Date:   2016-12-01 (Thu, 01 Dec 2016)

  Changed paths:
    M dataflowAPI/src/stackanalysis.C

  Log Message:
  -----------
  Merge pull request #285 from dyninst/sfm/fixes/untouched_blocks

Sfm/fixes/untouched blocks


  Commit: fadf29ca5b9615d35f0889e88b277a066b7414df
      https://github.com/dyninst/dyninst/commit/fadf29ca5b9615d35f0889e88b277a066b7414df
  Author: John Detter <jdetter@xxxxxxxx>
  Date:   2016-12-02 (Fri, 02 Dec 2016)

  Changed paths:
    M cmake/shared.cmake
    M cmake/warnings.cmake
    M common/src/linuxKludges.C
    M dataflowAPI/src/stackanalysis.C
    M dynC_API/src/C.y
    M dynC_API/src/dynC.tab.C
    M dynC_API/src/dynC.tab.h
    M dyninstAPI/src/BPatch_addressSpace.C
    M dyninstAPI/src/BPatch_type.C
    M dyninstAPI/src/Relocation/Transformers/Movement-adhoc.C
    M dyninstAPI/src/function.C
    M dyninstAPI/src/image.C
    M dyninstAPI/src/inst-power.C
    M instructionAPI/src/InstructionDecoder-aarch64.C
    M parseAPI/src/IA_powerDetails.C
    M parseThat/src/dyninstCore.C
    M proccontrol/doc/proccontrol.docx
    M proccontrol/doc/proccontrol.pdf
    M proccontrol/src/DecoderWindows.C
    M proccontrol/src/process.C
    M symtabAPI/src/Object-elf.C
    M symtabAPI/src/emitElf.C
    M symtabAPI/src/relocationEntry-elf-aarch64.C

  Log Message:
  -----------
  Merge branch 'master' into att_syntax


  Commit: 7f7d858a4f41fd50c148d6e033e66f92f2e6f9fb
      https://github.com/dyninst/dyninst/commit/7f7d858a4f41fd50c148d6e033e66f92f2e6f9fb
  Author: John Detter <jdetter@xxxxxxxx>
  Date:   2016-12-02 (Fri, 02 Dec 2016)

  Changed paths:
    M common/h/entryIDs.h
    M common/src/arch-x86.C
    M instructionAPI/src/InstructionDecoder-aarch64.C
    M instructionAPI/src/InstructionDecoder-aarch64.h
    M instructionAPI/src/InstructionDecoder-x86.C
    M instructionAPI/src/aarch64_opcode_tables.C

  Log Message:
  -----------
  Merge branch 'att_syntax' of http://github.com/dyninst/dyninst into att_syntax


Compare: https://github.com/dyninst/dyninst/compare/8012061aa80b...7f7d858a4f41
[← Prev in Thread] Current Thread [Next in Thread→]