November 18, 2011
  Branch: refs/heads/master
  Home:   https://github.com/D-Programming-Language/druntime

  Commit: 272e878401297779738a1a0d7eec7308a10f0bdc
      https://github.com/D-Programming-Language/druntime/commit/272e878401297779738a1a0d7eec7308a10f0bdc
  Author: David Nadlinger <code at klickverbot.at>
  Date:   2011-11-18 (Fri, 18 Nov 2011)

  Changed paths:
    M src/rt/deh2.d

  Log Message:
  -----------
  Fix range violaions in Posix exception handling code.

The code would previously lead to a range violation (and thus an infinite loop because an exception was thrown during exception handling) when druntime was built without bounds checking disabled.

At first sight it seems like the old code could work, but what really happens is that it first index into the (dummy) length 1 static array, and then takes the address, not the other way round.

phi and pcb are intended to be pointers to DHandlerInfo/DCatchBlock, this is also what the original C code did.


  Commit: 0b9c4c651ffb07e257f52d844a698a287cf65d15
      https://github.com/D-Programming-Language/druntime/commit/0b9c4c651ffb07e257f52d844a698a287cf65d15
  Author: Sean Kelly <sean at invisibleduck.org>
  Date:   2011-11-18 (Fri, 18 Nov 2011)

  Changed paths:
    M src/rt/deh2.d

  Log Message:
  -----------
  Merge pull request #85 from klickverbot/eh-range-violation

Fix range violaions in Posix exception handling code.


Compare: https://github.com/D-Programming-Language/druntime/compare/40903b2...0b9c4c6
November 19, 2011
Windows has the same problem in deh.d: http://d.puremagic.com/issues/show_bug.cgi?id=5583

On 19.11.2011 00:56, noreply at github.com wrote:
>    Branch: refs/heads/master
>    Home:   https://github.com/D-Programming-Language/druntime
>
>    Commit: 272e878401297779738a1a0d7eec7308a10f0bdc
>        https://github.com/D-Programming-Language/druntime/commit/272e878401297779738a1a0d7eec7308a10f0bdc
>    Author: David Nadlinger<code at klickverbot.at>
>    Date:   2011-11-18 (Fri, 18 Nov 2011)
>
>    Changed paths:
>      M src/rt/deh2.d
>
>    Log Message:
>    -----------
>    Fix range violaions in Posix exception handling code.
>
> The code would previously lead to a range violation (and thus an infinite loop because an exception was thrown during exception handling) when druntime was built without bounds checking disabled.
>
> At first sight it seems like the old code could work, but what really happens is that it first index into the (dummy) length 1 static array, and then takes the address, not the other way round.
>
> phi and pcb are intended to be pointers to DHandlerInfo/DCatchBlock, this is also what the original C code did.
>
>
>    Commit: 0b9c4c651ffb07e257f52d844a698a287cf65d15
>        https://github.com/D-Programming-Language/druntime/commit/0b9c4c651ffb07e257f52d844a698a287cf65d15
>    Author: Sean Kelly<sean at invisibleduck.org>
>    Date:   2011-11-18 (Fri, 18 Nov 2011)
>
>    Changed paths:
>      M src/rt/deh2.d
>
>    Log Message:
>    -----------
>    Merge pull request #85 from klickverbot/eh-range-violation
>
> Fix range violaions in Posix exception handling code.
>
>
> Compare: https://github.com/D-Programming-Language/druntime/compare/40903b2...0b9c4c6