make-alpha
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: addsuffix manual example wrong, se_implicit test 4 fails.


From: John E. Malmberg
Subject: Re: addsuffix manual example wrong, se_implicit test 4 fails.
Date: Sun, 05 Oct 2014 16:56:06 -0500
User-agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.1.2

On 10/4/2014 3:19 AM, h.becker wrote:
On 10/04/2014 12:38 AM, John E. Malmberg wrote:
Found another VMS specific bug in dir.c (dir_contents_file_exists_p)

This always returns that a file exists because first it calls
downcase(filename) which replaces filename with a static pointer.

Then a few lines later only on VMS, it does:
    df->name = strcache_add_len(downcase(d->d_name), len);

This overwrites where filename points with the lower case contents of
d->d_name.

And finally a test is to see if d->d_name is the same as filename, and
since they are both pointing at the same static storage, it results in
the file being marked as found.

Yes, it is a bug, but I'm not sure whether downcase() is ONLY used for VMS.

It is not.

The unanswered question is why does VMS need additional downcase conversions that the other platforms do not.

The possible answers are:

1. It should not with two variants.

   a. The non-VMS code is buggy and there are no other case
      insensitive platforms in use so no one noticed.

   b. This additional code is not needed on VMS.

2. There is something unknown that is different about VMS from the other platforms that are case insensitive.

That answer will need to be investigated later.

Just before "my VMS system" disappeared from the net, I saw this too,
when I disabled vmsify() - which makes/uses a copy of 'filename'.

vmsify() correctly handles only a small subset of Unix names, for the rest it returns garbage. There is a ticket open on that.

I have also locally fixed several instances where vmsify() was being called and should not have been, but will need to take another look at that.

On a future note, on current VMS, the Case sensitive filesystem
attribute is a per process property, so we will need a global variable
to contain the status.  I am not going to address that issue at this time.

... "is a per process property" but only affects the ODS5 filesystem
although in a recipe there can be ODS2 files for source and target files.

If you are running a recipe that needs case sensitive mode, then the ODS2 files will show up in uppercase to all the tools. It will not help to have make pretend that the ODS-2 are lowercase.

Since the process state can be easily detected, the option should be a run-time feature not a compiled variant, but again, that is a future issue.

PS: Shouldn't this be posted on address@hidden

Not sure.  This is about internals to make as it is implemented on VMS.

The fixes for the downcase() issues were trivial, and got the se_implicit and se_explicit tests to work for me.

Unfortunately there are still more bugs, as it appears that some of the existing VMS specific code is depending on those bugs still existing in other sections of the VMS code.

This downcase() usage bug was causing a number of files that did not exist show up as existing.

Now that I have fixed it, it turns out that make is having trouble finding some files that do exist and reporting them as missing.
I am still investigating that.

Regards,
-John





reply via email to

[Prev in Thread] Current Thread [Next in Thread]