[Info-vax] Calling standards, was: Re: Byte range locking - was Re: Oracle on VMS

Bill Gunshannon bill.gunshannon at gmail.com
Wed Nov 23 12:09:21 EST 2016


On 11/23/16 11:36 AM, Johnny Billquist wrote:
> On 2016-11-23 16:54, Bill Gunshannon wrote:
>> On 11/23/16 4:06 AM, Johnny Billquist wrote:
>>> On 2016-11-22 19:52, Simon Clubley wrote:
>>>> On 2016-11-22, Robert A. Brooks <FIRST.LAST at vmssoftware.com> wrote:
>>>>
>>>> However, at the very lowest levels of those code bases, the majority
>>>> still calls into a C API regardless of what the rest of the code is
>>>> written in. This makes the C API on Unix/Linux the Unix/Linux
>>>> equivalent of the common calling standard on VMS.
>>>>
>>>> The main issue I have with the C APIs are the lack of counted strings
>>>> or descriptors for string handling (which annoys me) but that doesn't
>>>> change the fact that the C API _is_ the common calling standard for
>>>> Unix/Linux.
>>>
>>> This is muddling the water some. You should keep the C standard library
>>> separated from the Unix API.
>>>
>>> The C standard library use NUL-terminated strings, which (as we all
>>> know) have serious security problems, and god knows what else.
>>
>> Why do people insist on perpetuating the notion that this is a C
>> security problem.  C merely continued a practice that predated it
>> probably to maintain compatability with earlier code.
>
> It *is* a C security problem. That does not imply that it isn't a
> problem elsewhere as well, but trying to deny that this is a problem in
> C is silly. And it certainly does not imply that the problem only
> appeared with C. But it still is a problem in C...

Of course it's a C problem.  But people seem to think that C caused it.
C merely chose to not violate an existing practice.  It would not
surprise me to find out that the .ASCIZ directive directly influenced
the choice to use null terminated strings in C.  But I guess we'll
never know.

>
>> The PDP-11 Macro Directive .PRINT takes a null terminated string
>> as its only argument.  I suspect the VAX had the same and it
>> probably still exists in MACRO but I don't have my manual handy to
>> verify that.
>
> The *RT-11* Macro Directive .PRINT takes a null terminated string. Not
> PDP-11 MACRO in general. Try that on RSX, and you'll just get an error
> when assembling... :-)
>

True.  I just looked in my RSTS manual and the RSX executive doesn't
have .ANYTHING directives at all.  Now I have to go look at some of
my other manuals and see just who else used null terminated strings.
UNIVAC-1100 did not.  It, too, had descriptors.  I have a number of
other assembler manuals be interesting to know just how many used
null termination as a common method.  I know it was fairly common
in Z80 code i worked with even before a C compiler became common.

bill




More information about the Info-vax mailing list