[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Cvs-dev] cvs-passwd patch: weird problem
From: |
Mark D. Baushke |
Subject: |
Re: [Cvs-dev] cvs-passwd patch: weird problem |
Date: |
Sat, 19 Aug 2006 13:25:20 -0700 |
Hi Prasad,
What output do you get with the following commands on your FC5 system:
uname -a
gcc -v
cat /etc/redhat-release
If you see something like this:
% uname -a
Linux prasad-fc5 2.6.15-1.2054_FC5smp #1 SMP Tue Mar 14 16:05:46 EST 2006 i686
i686 i386 GNU/Linux
% gcc -v
Using built-in specs.
Target: i386-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --enable-shared --enable-threads=posix
--enable-checking=release --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-libgcj-multifile
--enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk
--disable-dssi --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre
--with-cpu=generic --host=i386-redhat-linux
Thread model: posix
gcc version 4.1.1 20060525 (Red Hat 4.1.1-1)
% cat /etc/redhat-release
Fedora Core release 5 (Bordeaux)
% info gcc
/ options RET RET / -fstrict-aliasing RET
At this point you should be on the -fstrict-aliasing option
/ RET / RET / RET / RET
at this point you should be on the entry for the `-fstrict-aliasing'
option.
bash
CFLAGS='-g -O2 -fno-strict-aliasing' ./configure
grep ^CFLAGS src/Makefile
# You should see something like: CFLAGS = -g -O2 -fno-strict-aliasing
make
I believe that things should work fine for the compilation. If not,
please let us know what happens.
make check
Well, there is no way that running this will do me any good. I do not
have and will NEVER run :pserver: on any machine of my own. I am not
a fan of it and never will be a fan of it.
If you are not able to generate sanity.sh tests that setup a
CVSROOT/passwd file and then run emulated client and server commands
similar to what you see in the writeproxy stuff, then your feature will
not be added to cvs by me.
I did do a compiler with -g -O4 -Wstrict-aliasing=2 and didn't come up
with any warnings in your passwd.c code. So, you may be running into a
code generation bug with GCC 4.1.1. Maybe something like this one:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28778 or maybe something
different. It is possible that gcc may be sensative to other problems
such that writing the code this way:
case PASSWD: /* change password */
if (argc < 2)
error (1, 0, "insufficient arguments");
str = xstrdup (argv[1]);
if (do_encrypt)
pass = encrypt_pass (descramble (str));
else
pass = descramble (str);
change_pass (usr, pass);
free (str);
break;
might work for you. Regarding your code in general...
Use' bool do_encrypt = false;' rather than 'short do_encrypt = 0;'
and 'do_encrypt = true;' rather than 'do_encrypt = 1;'
I don't understand why mode is not of type enum op_mode given that you
take pains to define the enum right above it.
in check_option(), be adivsed that 'c' should be an int rather than a
char (the getopt() function returns an int). You need to do this to
avoid problems on systems where char is signed.
I do not understand why an unused 'buf[BUFLEN]' is present in the
passswd() function.
-- Mark
Prasad J Pandit <address@hidden> writes:
> On Thu, 17 Aug 2006, Mark D. Baushke wrote:
> > That sounds very odd indeed. It sounds to me as though you are getting
> > bit by aliasing with local variables. If you are doing any casting
> > between types and you are using a very recent gcc, then you may find
> > that adding -fno-strict-aliasing to your CFLAGS will fix your problem.
>
> Hello Mark! :)
>
> Thanks for the information. I tried excuting it on FreeBSD with gcc 3.4.4
> and to my surprise, it worked perfectly well. I mean, absolutely no
> hassles.
>
> And about -fno-strict-aliasing option, I checked the gcc 4.1.1 man page,
> no such option is supported. I tried -fstrict-aliasing, but in vain. :(
>
> I think, it could be, as you said, because of using very recent gcc. Could
> you please test run it, just to see if that is the case.
>
> Thank you!
> --
> regards
> -Prasad
> PS: Please don't send me html/attachment/Fwd mails
- [Cvs-dev] cvs-passwd patch: weird problem, Prasad J Pandit, 2006/08/19
- [Cvs-dev] Re: cvs-passwd patch: weird problem, Mark D. Baushke, 2006/08/17
- Re: [Cvs-dev] cvs-passwd patch: weird problem,
Mark D. Baushke <=
- Re: [Cvs-dev] cvs-passwd patch: weird problem, Prasad J Pandit, 2006/08/21
- Re: [Cvs-dev] cvs-passwd patch: weird problem, Mark D. Baushke, 2006/08/21
- Re: [Cvs-dev] cvs-passwd patch: weird problem, Prasad J Pandit, 2006/08/21
- Re: [Cvs-dev] cvs-passwd patch: weird problem, Mark D. Baushke, 2006/08/21
- Re: [Cvs-dev] cvs-passwd patch: weird problem, Larry Jones, 2006/08/21
- Re: [Cvs-dev] cvs-passwd patch: weird problem, Prasad J Pandit, 2006/08/22
- Re: [Cvs-dev] cvs-passwd patch: weird problem, Mark D. Baushke, 2006/08/22
- Re: [Cvs-dev] cvs-passwd patch: weird problem, Prasad J Pandit, 2006/08/22
- Re: [Cvs-dev] cvs-passwd patch: weird problem, Derek R. Price, 2006/08/22
- Re: [Cvs-dev] cvs-passwd patch: weird problem, Larry Jones, 2006/08/22