This is the mail archive of the libc-alpha@sources.redhat.com 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]

Re: isprint/isspace segfaulting


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Raj wrote:

> PS: In the below program if i declare 'ch' as 'char', then things work
> fine. Only when it is declared as 'int' does the problem shows up.
> 
> Is this expected ?

Why would you expect the program to work?  You pass a partially
initialized value to isspace.  Three of the four bytes are
uninitialized, and which depends on the endianess.

- -- 
â Ulrich Drepper â Red Hat, Inc. â 444 Castro St â Mountain View, CA â
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)

iD8DBQE/1rn62ijCOnn/RHQRAhbNAJ9AGZcKwGDBHENgi9XJGndzAaCYVQCgg7Fl
yU6SFO2sLfW8wpm+Xg7WOTo=
=zB+v
-----END PGP SIGNATURE-----


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