svn commit: r209358 - head/cddl/contrib/opensolaris/lib/libdtrace/common

Alexander Kabaev kabaev at
Mon Jun 21 19:05:51 UTC 2010

On Tue, 22 Jun 2010 04:30:12 +1000 (EST)
Bruce Evans <brde at> wrote:

> On Mon, 21 Jun 2010, Alexander Kabaev wrote:
> > On Tue, 22 Jun 2010 03:22:40 +1000 (EST)
> > Bruce Evans <brde at> wrote:
> >
> >
> > DTrace _does_ try to unput EOF though and apparently gets away with
> > it on Solaris, so while yor version is correct, it is also useless.
> Do you mean that it tries to unput EOF as an int (not obtained from a
> char), and that that must fail and not unput ((unsigned char)EOF)?
> Then the current version is still broken on platforms with chars
> signed, since when it tries to unput a char with value EOF, that will
> fail and not unput ((unsigned char)<char's value>).

Correct, but chances of valid DTrace script having 0xff character in
them is pretty much nonexistent, so I let that slide rather than
pushing more changes into externally maintained code. To be absolutely
correct, I think, we need to declare unput() as inline/static taking int
argument and make sure that we invoke it as unput((unsigned char)*q)
every time q is declared as char *.

Alexander Kabaev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 188 bytes
Desc: not available
Url :

More information about the svn-src-head mailing list