Hi,

beside the already reported memory leaks, I've now two reports about
the ulimit builtin which fails in some cases if called within a
loop and one of the options -s and/or -n.  In both bug reports scriptlets
like

  #!/bin/ksh
  while :
    do
    ./testksh_ulimit.sh || exit 1
  done

with testksh_ulimit.sh

  #!/bin/ksh
  ulimit -n || exit 1

this seems to be a bug in the structure type Limit_t as
the name "msgqueue" including the ASCII zero is longer
than name[8].  Indeed a patch from Li Bin seems to fix the
problem [see attachment].  The further discussion also
mentioned to use a char pointer instead of an array
which indeed should also solve the problem as all is
marked as const.

Werner

-- 
  "Having a smoking section in a restaurant is like having
          a peeing section in a swimming pool." -- Edward Burr
Index: ksh93/src/cmd/ksh93/include/ulimit.h
===================================================================
--- ksh93.orig/src/cmd/ksh93/include/ulimit.h
+++ ksh93/src/cmd/ksh93/include/ulimit.h
@@ -157,7 +157,7 @@
 
 typedef struct Limit_s
 {
-	const char	name[8];
+	const char	name[16];
 	const char*	description;
 	int		index;
 	const char*	conf;
_______________________________________________
ast-developers mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-developers

Reply via email to