Skip to content

Commit

Permalink
Updates release notes for PR #4490
Browse files Browse the repository at this point in the history
  • Loading branch information
ponylang-main committed Feb 6, 2024
1 parent 0d5ff2b commit 8b3f16e
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 23 deletions.
23 changes: 0 additions & 23 deletions .release-notes/4174.md

This file was deleted.

24 changes: 24 additions & 0 deletions .release-notes/next-release.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,27 @@ Back in August of 2023, we had to drop MacOS on Apple Silicon as a supported pla

GitHub recently announced that they now have Apple Silicon MacOS machines so, we are back in business and MacOS on Apple Silicon is once again a supported platform.

## Fix for potential memory corruption in `Array.copy_to`

`Array.copy_to` did not check whether the source or destination Arrays had been initialized or whether the requested number of elements to be copied exceeded the number of available elements (allocated memory). These issues would result in potential dereferencing of a null pointer or attempts to access unallocated memory.

Before this fix, the following code would print `11` then `0`:

```pony
actor Main
new create(e: Env) =>
var src: Array[U8] = [1]
var dest: Array[U8] = [11; 1; 2; 3; 4; 5; 6]
try
e.out.print(dest(0)?.string())
end
src.copy_to(dest, 11, 0, 10)
try
e.out.print(dest(0)?.string())
end
```

After the fix, this code correctly prints `11` and `11`.

0 comments on commit 8b3f16e

Please sign in to comment.