jemc changed the topic of #ponylang to: Welcome! Please check out our Code of Conduct => https://github.com/ponylang/ponyc/blob/master/CODE_OF_CONDUCT.md | Public IRC logs are available => http://irclog.whitequark.org/ponylang
c355e3b has quit [Quit: Connection closed for inactivity]
mcguire has quit [Ping timeout: 276 seconds]
amclain has quit [Quit: Leaving]
jemc has quit [Ping timeout: 276 seconds]
graaff has joined #ponylang
woona has joined #ponylang
woona has left #ponylang ["Leaving"]
montanonic has joined #ponylang
c355e3b has joined #ponylang
gsteed has joined #ponylang
Matthias247 has joined #ponylang
Matthias247 has quit [Read error: Connection reset by peer]
montanonic has quit [Ping timeout: 244 seconds]
jemc has joined #ponylang
Perelandric has joined #ponylang
gsteed has quit [Ping timeout: 264 seconds]
<Perelandric> Just curious, do `Pointer._alloc/_realloc` zero memory? I assume so, but wanted to be certain.
montanonic has joined #ponylang
<jemc> Perelandric: I don't think it does, but not sure
<jemc> it uses `pony_alloc` internally, and I don't think `pony_alloc` zeroes memory, but again, not sure
<jemc> Perelandric: yes, I ran a quick test of an infinite loop allocating a ten-byte buffer with `pony_alloc` and printing the bytes - eventually I start seeing some non-zero ones
<jemc> so, bytes are not zeroed for you - you have to expect undefined contents of memory when you allocate
<Perelandric> jemc: Thanks for checking. What got me thinking about it was the update to Array.append...
<Perelandric> I noticed that the `_size` is alway set after the loop instead of inside it, and it made me wonder...
<Perelandric> if there could be any crafty way of forcing an error during that loop, if it could expose arbitrary memory.
<Perelandric> Makes sense that `_size` should always end up at the expected value though.
<jemc> Perelandric: that's why the `_size` is set outside the `try` block
<jemc> and it's not set to the expected len, but to the actual number of iterations of the loop, which should match the actual number of bytes
<jemc> of course, if you can find an edge case I didn't notice, we should repair it
<Perelandric> jemc: Ugh, of course, sorry about that. I was thinking of the `copy_len` instead of `n`.
<Perelandric> In that case, the `n` could be elimiated altogether. I think that's what threw me off at first.
<Perelandric> Unless there's another reason `_size = _size + 1` shouldn't be in the loop.
<Perelandric> Oh, it would still be needed for `seq(offset + n)`
<Perelandric> I'll shut up now... ;)
jemc has quit [Ping timeout: 276 seconds]
wizeman has quit [Quit: Connection closed for inactivity]
jemc has joined #ponylang
montanonic has quit [Ping timeout: 276 seconds]
jemc has quit [Ping timeout: 250 seconds]
wizeman has joined #ponylang
jemc has joined #ponylang
jemc has quit [Ping timeout: 264 seconds]
Matthias247 has joined #ponylang
graaff has quit [Quit: Leaving]
gsteed has joined #ponylang
k0nsl has quit [Ping timeout: 276 seconds]
k0nsl has joined #ponylang
wizeman has quit [Quit: Connection closed for inactivity]
montanonic has joined #ponylang
mrkishi has joined #ponylang
Matthias247 has quit [Quit: Matthias247]
gsteed has quit [Quit: Leaving]