On 08/02/2012 08:49 AM, Chet Ramey wrote:
> If you want to look at the fixed version, you can get it from the `devel'
> branch of the bash git tree on savannah (the relevant file is
> lib/readline/signals.c).

OK great, thanks for pointing me in the right direction. I don't quite
know how to compile a standalone readline from here to test the fix,
but I can at least read through the src.

Looking at the new sh_set_lines_and_columns, it avoids calling malloc
but will use setenv (or putenv) to update an environment variable.

Neither setenv nor putenv are signal-safe in POSIX, looks like. I looked at
the glibc implementation, there are setenv codepaths that malloc(). At least
putenv is documented to be reentrant (http://linux.die.net/man/3/putenv) on
linux.

So without knowing too much about the details & portability constraints, is it
possible that the new implementation may still have issues?

Thanks,
-Brian


_______________________________________________
Bug-readline mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-readline

Reply via email to