On Tue, Oct 11, 2022 at 10:32 AM Marcin Błażejowski
<marcin(a)wrzosy.nsb.pl> wrote:
Hi,
script below, current git: why the second loop crashes?
<hansl>
set verbose off
set seed 123456
clear
bundle M
N = 10^6
printf "The first loop\n"
loop i=1..N --quiet
bundle new = null
bundle M.foo = new
endloop
printf "The second loop\n"
loop i=1..N --quiet
bundle M.foo = null
endloop
</hansl>
I'm getting an error on the second loop but no crash. Did you really
mean "crash" (segfault or otherwise halted by the OS).
Anyway, the condition provoking the error in the second case was a
kinda subtle internal thing, to do with the fact that setting a
bundled object directly to "null" is how the statement "delete
bun.key" is implemented. But that internal thing should not interfere
with your formulation above, and that's now fixed in git.
Allin