mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-10-25 05:10:28 +02:00
20959: fix crash unloading zsh/parameter and test the fix
This commit is contained in:
parent
7208c4024e
commit
43d480057b
4 changed files with 15 additions and 4 deletions
|
|
@ -1,3 +1,8 @@
|
|||
2005-03-10 Peter Stephenson <pws@csr.com>
|
||||
|
||||
* 20959 (variant of 20958): Src/params.c, Src/Module/parameter.c,
|
||||
Test/V01zmodload.ztst: fix crash unloading zsh/parameter and test.
|
||||
|
||||
2005-03-09 Peter Stephenson <pws@csr.com>
|
||||
|
||||
* 20955: README, Src/builtin.c: "unset foo" should return
|
||||
|
|
|
|||
|
|
@ -1817,7 +1817,7 @@ struct pardef {
|
|||
* in a compile-time initialiser, so we use this instead.
|
||||
*/
|
||||
static const struct gsu_hash pmnullsethash_gsu =
|
||||
{ hashgetfn, nullsethashfn, NULL };
|
||||
{ hashgetfn, nullsethashfn, nullunsetfn };
|
||||
static const struct gsu_hash pmcommands_gsu =
|
||||
{ hashgetfn, setpmcommands, stdunsetfn };
|
||||
static const struct gsu_hash pmfunctions_gsu =
|
||||
|
|
|
|||
|
|
@ -147,7 +147,7 @@ mod_export const struct gsu_hash stdhash_gsu =
|
|||
{ hashgetfn, hashsetfn, stdunsetfn };
|
||||
/**/
|
||||
mod_export const struct gsu_hash nullsethash_gsu =
|
||||
{ hashgetfn, nullsethashfn, NULL };
|
||||
{ hashgetfn, nullsethashfn, nullunsetfn };
|
||||
|
||||
|
||||
/* Non standard methods (not exported) */
|
||||
|
|
@ -2604,6 +2604,11 @@ void
|
|||
nullintsetfn(UNUSED(Param pm), UNUSED(zlong x))
|
||||
{}
|
||||
|
||||
/**/
|
||||
mod_export void
|
||||
nullunsetfn(UNUSED(Param pm), UNUSED(int exp))
|
||||
{}
|
||||
|
||||
|
||||
/* Function to get value of generic special integer *
|
||||
* parameter. data is pointer to global variable *
|
||||
|
|
|
|||
|
|
@ -151,11 +151,12 @@
|
|||
zmodload -e example
|
||||
1:Delete the module alias again
|
||||
|
||||
# Don't unload the two modules that are required by the test system!
|
||||
# Don't unload the main module.
|
||||
# Do unload zsh/parameter, but reload it as it is needed.
|
||||
|
||||
mods[(r)zsh/main]=()
|
||||
mods[(r)zsh/parameter]=()
|
||||
zmodunload $mods
|
||||
zmodload zsh/parameter
|
||||
0d:Unload the modules loaded by this test suite
|
||||
|
||||
%clean
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue