This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/18096] null deref in wordexp/parse_dollars/parse_arith


https://sourceware.org/bugzilla/show_bug.cgi?id=18096

--- Comment #5 from Carlos O'Donell <carlos at redhat dot com> ---
(In reply to Andreas Schwab from comment #4)
> ${VAR?} is defined to print a message if VAR is unset, so this is as
> designed.

Does that really have to happen for wordexp?

The function as defined by POSIX only requires the result of the expansion to
be returned, it says nothing about the potential shell-like side-effects like
SIGFPE and printing error messages.

I don't see it at all as being useful for wordexp to print anything to the
programs stdout, where it will only get mixed with program output, and you have
no way of knowing exactly when that will be if you run wordexp in a thread.
Worse you'd have to redirect stdin/stdout for the thread, which you can't
easily do.

How is it possibly useful for wordexp to print shell-related side-effects?

-- 
You are receiving this mail because:
You are on the CC list for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]