[PD-dev] message crash when using menuclose on patch

IOhannes m zmölnig zmoelnig at iem.at
Sun Oct 1 16:21:40 CEST 2017


On 09/29/2017 10:26 AM, Dan Wilcox wrote:
> The funny thing is that I never experienced this issue before, way back to the original system running in 2006. I think the difference is the hardware was slower, so the list might have been traversed before the patch was closed whereas now the patch closes more quickly while the message is mid-list. Or vice versa.

afaict everyhing happening here is fully deterministic (that is: there's
no race condition involved), leading to "undefined behaviour".
UB means that it *can* crash, but it might as well not.

there#s a couple of other reasons why the problem might be exposed now
(and not in the olden days):
- modern compilers do better optimization
- fixing memory bugs (e.g. memleaks) changes the memory layout (allowing
re-use of previously-not-unallocated memory)

gmadsr
IOhannes

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.puredata.info/pipermail/pd-dev/attachments/20171001/80824473/attachment.sig>


More information about the Pd-dev mailing list