Branch: refs/heads/davem/newx_aux Home: https://github.com/Perl/perl5 Commit: 239af9f3786b2d5623067a25f061f2c2987b209f https://github.com/Perl/perl5/commit/239af9f3786b2d5623067a25f061f2c2987b209f Author: David Mitchell <da...@iabyn.com> Date: 2024-03-17 (Sun, 17 Mar 2024)
Changed paths: M class.c M op.c Log Message: ----------- OP_METHSTART, OP_INITFIELD: use shared mem for aux Allocate the aux structure for these two ops using PerlMemShared_malloc() rather then Newx(). OPs (and auxiliary structures) are shared between threads, and there's no guarantee that an OP will be freed by the same thread as the one which created it. Some OSes (Windows IIRC) get upset if memory is malloc()ed and free()d by different threads, since each thread has a separate malloc() pool. Hence we usually use PerlMemShared_malloc()/_free() to allocate such shared structs. These two recently-added ops were just using Newx(). This commit fixes them. No tests failures as far as I'm aware - this is more a theoretical thing where one thread compiles some code, creates a child, then exits. The child lives on, and when the child finally exits, the aux struct is freed to the wrong pool. To unsubscribe from these emails, change your notification settings at https://github.com/Perl/perl5/settings/notifications