Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: workers/40626 (commit 6c476c22) causes multiple test failures



On Feb 27,  1:41am, Sebastian Gniazdowski wrote:
} Subject: Re: workers/40626 (commit 6c476c22) causes multiple test failures
}
} On 26 February 2017 at 20:42, Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
} wrote:
} > I suspect this is what comes of some attempt to optimize assignments.
} 
} It's impossible, hashes weren't optimized.

Sorry, didn't mean to imply it was the *recent* attempts.

} BTW options+=( ), etc. still segfaults.

I am not able to reproduce that.  The functions+= test in V06paramter
passes for me.  Also BEFORE my patch valgrind would report errors:

torch% options+=()
torch% options+=()
==2255== Invalid read of size 4
==2255==    at 0x80FF148: setpmoptions (parameter.c:949)
==2255==    by 0x80C06BA: arrhashsetfn (params.c:3638)
==2255==    by 0x80BDAB2: setarrvalue (params.c:2668)
==2255==    by 0x80BF2FA: assignaparam (params.c:3133)
==2255==    by 0x807C542: addvars (exec.c:2498)
==2255==    by 0x807D92E: execcmd_exec (exec.c:3004)
==2255==    by 0x807AED8: execpline2 (exec.c:1872)
==2255==    by 0x8079D42: execpline (exec.c:1602)
==2255==    by 0x8079367: execlist (exec.c:1360)
==2255==    by 0x8078B75: execode (exec.c:1141)
==2255==    by 0x809819D: loop (init.c:208)
==2255==    by 0x809BB75: zsh_main (init.c:1692)
==2255==  Address 0x29283D is not stack'd, malloc'd or (recently) free'd

But subsequent to the patch:

schaefer[1031] valgrind Src/zsh -f
==8816== Memcheck, a memory error detector.
==8816== Copyright (C) 2002-2005, and GNU GPL'd, by Julian Seward et al.
==8816== Using LibVEX rev 1575, a library for dynamic binary translation.
==8816== Copyright (C) 2004-2005, and GNU GPL'd, by OpenWorks LLP.
==8816== Using valgrind-3.1.1, a dynamic binary instrumentation framework.
==8816== Copyright (C) 2000-2005, and GNU GPL'd, by Julian Seward et al.
==8816== For more details, rerun with: -v
==8816== 
torch% print $options
off on off off off off off off off on off on off off off off off on off off off
on on off off off off on off off off off off off off off off off off off on off
off on off off off on on on on off off off on off off on off off on off off on
off on off off on off on off off off on off off off on off off on off off off
off off off off off on off on off off on off off off off off off off on off off
off off on off off off on off on off off on off off off off on on on off on off
on on on on off off off off on on off off on off off off off off on off off on
off off on on off off off off off on off off off off on on off on off off on
off off on off on off off off off off off off off on on off on off off off
torch% options+=()
torch% options+=()
torch% 
==8816== 
==8816== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 24 from 2)
==8816== malloc/free: in use at exit: 0 bytes in 0 blocks.
==8816== malloc/free: 0 allocs, 0 frees, 0 bytes allocated.
==8816== For counts of detected errors, rerun with: -v
==8816== All heap blocks were freed -- no leaks are possible.



Messages sorted by: Reverse Date, Date, Thread, Author