Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Say "twenty-three-skiddoo" to logout.


computers / comp.os.vms / Crash in SYS$FILESCAN if passed string above 0x7fffffff

SubjectAuthor
* Crash in SYS$FILESCAN if passed string above 0x7fffffffJake Hamby (Solid State Jake)
+* Re: Crash in SYS$FILESCAN if passed string above 0x7fffffffArne Vajhøj
|+- Re: Crash in SYS$FILESCAN if passed string above 0x7fffffffDavid Jones
|`* Re: Crash in SYS$FILESCAN if passed string above 0x7fffffffSimon Clubley
| `- Re: Crash in SYS$FILESCAN if passed string above 0x7fffffffArne Vajhøj
+- Re: Crash in SYS$FILESCAN if passed string above 0x7fffffffStephen Hoffman
`* Re: Crash in SYS$FILESCAN if passed string above 0x7fffffffhb@end.of.inter.net
 `* Re: Crash in SYS$FILESCAN if passed string above 0x7fffffffJake Hamby (Solid State Jake)
  +* Re: Crash in SYS$FILESCAN if passed string above 0x7fffffffJake Hamby (Solid State Jake)
  |`* Re: Crash in SYS$FILESCAN if passed string above 0x7fffffffhb@end.of.inter.net
  | `- Re: Crash in SYS$FILESCAN if passed string above 0x7fffffffJake Hamby (Solid State Jake)
  +- Re: Crash in SYS$FILESCAN if passed string above 0x7fffffffCraig A. Berry
  `* Re: Crash in SYS$FILESCAN if passed string above 0x7fffffffArne Vajhøj
   `* Re: Crash in SYS$FILESCAN if passed string above 0x7fffffffJake Hamby (Solid State Jake)
    +- Re: Crash in SYS$FILESCAN if passed string above 0x7fffffffJake Hamby (Solid State Jake)
    `* Re: Crash in SYS$FILESCAN if passed string above 0x7fffffffArmine Arabyan
     `* Re: Crash in SYS$FILESCAN if passed string above 0x7fffffffJake Hamby (Solid State Jake)
      +- Re: Crash in SYS$FILESCAN if passed string above 0x7fffffffhb@end.of.inter.net
      +- Re: Crash in SYS$FILESCAN if passed string above 0x7fffffffJake Hamby (Solid State Jake)
      `* Re: Crash in SYS$FILESCAN if passed string above 0x7fffffffSingle Stage to Orbit
       `* Re: Crash in SYS$FILESCAN if passed string above 0x7fffffffhb@end.of.inter.net
        `- Re: Crash in SYS$FILESCAN if passed string above 0x7fffffffSingle Stage to Orbit

1
Crash in SYS$FILESCAN if passed string above 0x7fffffff

<cfb6e772-ea48-4eba-a029-e6f9ba94aa19n@googlegroups.com>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=30708&group=comp.os.vms#30708

  copy link   Newsgroups: comp.os.vms
X-Received: by 2002:a05:620a:6a07:b0:773:ae41:d88f with SMTP id uc7-20020a05620a6a0700b00773ae41d88fmr101264qkn.0.1697970749091;
Sun, 22 Oct 2023 03:32:29 -0700 (PDT)
X-Received: by 2002:a05:6808:218b:b0:3ac:a02d:708f with SMTP id
be11-20020a056808218b00b003aca02d708fmr2331046oib.1.1697970748674; Sun, 22
Oct 2023 03:32:28 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!nntp.club.cc.cmu.edu!45.76.7.193.MISMATCH!3.us.feeder.erje.net!feeder.erje.net!border-1.nntp.ord.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.os.vms
Date: Sun, 22 Oct 2023 03:32:28 -0700 (PDT)
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:46b0:abc0:a0ca:d8dc:c8b2:78d3;
posting-account=OGFVHQoAAAASiNAamRQec8BtkuXxYFnQ
NNTP-Posting-Host: 2600:1700:46b0:abc0:a0ca:d8dc:c8b2:78d3
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <cfb6e772-ea48-4eba-a029-e6f9ba94aa19n@googlegroups.com>
Subject: Crash in SYS$FILESCAN if passed string above 0x7fffffff
From: jake.ha...@gmail.com (Jake Hamby (Solid State Jake))
Injection-Date: Sun, 22 Oct 2023 10:32:29 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 35
 by: Jake Hamby (Solid St - Sun, 22 Oct 2023 10:32 UTC

I figured out why the C++ version of Perl 5 that I'm nearly ready to check into my experimental tree was escaping all of the VMS filespecs and adding "/" to the end.

Perl uses SYS$FILESCAN to try to parse filenames, and if it succeeds, and the result is the same length as the input, it knows it's a VMS filename. Otherwise, it assumes it's a UNIX-style name. That test was failing, and on further printf debugging, I found sys$filescan was returning no values for any of the fields queried.

I was curious if there was anything unusual about the pointers to the strings, and I discovered that the C++ compiler, but not the C compiler, is allocating strings in the area just above 0x80000000, which is outside the normal 32-bit address range due to sign extension. See the diagram for reference:

https://docs.vmssoftware.com/vsi-openvms-programming-concepts-manual-volume-i/#_32_VA_CHAPT

To reproduce the issue, I used the sys_filescan.c example from James F. Duff: https://www.eight-cubed.com/examples/framework.php?file=sys_filescan.c

It runs properly as is, with C and C++ compilers, but if you modify it slightly to initialize the DESCRIPTOR with a strdup() of the string constant, now it works when compiled with the C compiler, but crashes inside of sys_filescan when compiled with Clang, and indeed, a printf shows the pointer looks like 0000000080076020 with Clang, and a value in P0 space with VSI C.

Regards,
Jake Hamby

That seems like something that shouldn't be happening, but since my last issue was user error, maybe this one is as well?

Regards,
Jake Hamby

Re: Crash in SYS$FILESCAN if passed string above 0x7fffffff

<uh36h0$2e63d$2@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=30711&group=comp.os.vms#30711

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!paganini.bofh.team!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: arn...@vajhoej.dk (Arne Vajhøj)
Newsgroups: comp.os.vms
Subject: Re: Crash in SYS$FILESCAN if passed string above 0x7fffffff
Date: Sun, 22 Oct 2023 09:02:24 -0400
Organization: A noiseless patient Spider
Lines: 42
Message-ID: <uh36h0$2e63d$2@dont-email.me>
References: <cfb6e772-ea48-4eba-a029-e6f9ba94aa19n@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 22 Oct 2023 13:02:24 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="49848ed4edef16d0e431c6721b7e3439";
logging-data="2562157"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19UTMU+i8lmJxrOL0oQD04XKW2/TsFVc88="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:5LjbfFQw/N/HXIn0OXNJHyI7ywA=
In-Reply-To: <cfb6e772-ea48-4eba-a029-e6f9ba94aa19n@googlegroups.com>
Content-Language: en-US
 by: Arne Vajhøj - Sun, 22 Oct 2023 13:02 UTC

On 10/22/2023 6:32 AM, Jake Hamby (Solid State Jake) wrote:
> I figured out why the C++ version of Perl 5 that I'm nearly ready to
> check into my experimental tree was escaping all of the VMS filespecs
> and adding "/" to the end.
>
> Perl uses SYS$FILESCAN to try to parse filenames, and if it succeeds,
> and the result is the same length as the input, it knows it's a VMS
> filename. Otherwise, it assumes it's a UNIX-style name. That test was
> failing, and on further printf debugging, I found sys$filescan was
> returning no values for any of the fields queried.
>
> I was curious if there was anything unusual about the pointers to the
> strings, and I discovered that the C++ compiler, but not the C
> compiler, is allocating strings in the area just above 0x80000000,
> which is outside the normal 32-bit address range due to sign
> extension. See the diagram for reference:
>
> https://docs.vmssoftware.com/vsi-openvms-programming-concepts-manual-volume-i/#_32_VA_CHAPT
>
> To reproduce the issue, I used the sys_filescan.c example from James
> F. Duff:
> https://www.eight-cubed.com/examples/framework.php?file=sys_filescan.c
>
> It runs properly as is, with C and C++ compilers, but if you modify
> it slightly to initialize the DESCRIPTOR with a strdup() of the
> string constant, now it works when compiled with the C compiler, but
> crashes inside of sys_filescan when compiled with Clang, and indeed,
> a printf shows the pointer looks like 0000000080076020 with Clang,
> and a value in P0 space with VSI C.

If SYS$FILESCAN only accept 32 bit pointers then the data
need to be in P0 or P1 space. P2 space does not work.

The documentation for SYS$FILESCAN does not mention anything
about 64 bit - I guess that means it does not support
64 bit pointers.

Either use another function that supports 64 bit pointers
or copy to a temporary area in P0 space. You can use
_malloc32 to allocate there.

Arne

Re: Crash in SYS$FILESCAN if passed string above 0x7fffffff

<0adad3e9-5aa4-45b3-8c4c-9cdfeeba3e84n@googlegroups.com>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=30712&group=comp.os.vms#30712

  copy link   Newsgroups: comp.os.vms
X-Received: by 2002:ac8:728a:0:b0:41c:b83d:7a56 with SMTP id v10-20020ac8728a000000b0041cb83d7a56mr112813qto.11.1697983085019;
Sun, 22 Oct 2023 06:58:05 -0700 (PDT)
X-Received: by 2002:a05:6871:331e:b0:1e9:c2a7:6593 with SMTP id
nf30-20020a056871331e00b001e9c2a76593mr3434045oac.6.1697983084798; Sun, 22
Oct 2023 06:58:04 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.os.vms
Date: Sun, 22 Oct 2023 06:58:04 -0700 (PDT)
In-Reply-To: <uh36h0$2e63d$2@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=104.231.150.181; posting-account=CO-_tAoAAACjjs2KLAw3xVKCy6Z_J3VK
NNTP-Posting-Host: 104.231.150.181
References: <cfb6e772-ea48-4eba-a029-e6f9ba94aa19n@googlegroups.com> <uh36h0$2e63d$2@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <0adad3e9-5aa4-45b3-8c4c-9cdfeeba3e84n@googlegroups.com>
Subject: Re: Crash in SYS$FILESCAN if passed string above 0x7fffffff
From: osuvma...@gmail.com (David Jones)
Injection-Date: Sun, 22 Oct 2023 13:58:05 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 2158
 by: David Jones - Sun, 22 Oct 2023 13:58 UTC

On Sunday, October 22, 2023 at 9:02:28 AM UTC-4, Arne Vajhøj wrote:
>
> The documentation for SYS$FILESCAN does not mention anything
> about 64 bit - I guess that means it does not support
> 64 bit pointers.
>
> Either use another function that supports 64 bit pointers
> or copy to a temporary area in P0 space. You can use
> _malloc32 to allocate there.
>
> Arne
One of the arguments to sys$filescan is a structure which gets filled in
by the service with the addresses of the name components within the
string you pass it. The address field in this structure is only 32-bits, so
it can't deal with P2 addresses.

I think the easiest way to fix it would be to add a flag bit to the fldflags
argument that makes the valuelst argument an alternate, 64-bit friendly,
structure. Valuelst is an array, so making the individual items variable
sized is awkward for the applications using $filescan.

Re: Crash in SYS$FILESCAN if passed string above 0x7fffffff

<uh3o3o$2ipch$1@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=30719&group=comp.os.vms#30719

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: seaoh...@hoffmanlabs.invalid (Stephen Hoffman)
Newsgroups: comp.os.vms
Subject: Re: Crash in SYS$FILESCAN if passed string above 0x7fffffff
Date: Sun, 22 Oct 2023 14:02:32 -0400
Organization: HoffmanLabs LLC
Lines: 19
Message-ID: <uh3o3o$2ipch$1@dont-email.me>
References: <cfb6e772-ea48-4eba-a029-e6f9ba94aa19n@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: dont-email.me; posting-host="64d3fbea680b41da7652534439a5a4f9";
logging-data="2712977"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18rQXVmbh0ak5AivZoI5Zr7KnGqRnqATds="
User-Agent: Unison/2.2
Cancel-Lock: sha1:Z2b++okV+C9ssp41ClspW/D0NeY=
 by: Stephen Hoffman - Sun, 22 Oct 2023 18:02 UTC

On 2023-10-22 10:32:28 +0000, Jake Hamby (Solid State Jake) said:

> I was curious if there was anything unusual about the pointers to the
> strings, and I discovered that the C++ compiler, but not the C
> compiler, is allocating strings in the area just above 0x80000000,
> which is outside the normal 32-bit address range due to sign extension.
> See the diagram for reference...

I'd try switching the call to a 64-bit itemlist as a potential
workaround for this. But whether $filescan supports that, or just
32-bit shown in the doc?

Once again, not busting everything together—going to 64-bit, rather
than this current 32- and 64-bit API morass—seemingly busts everything
separately.

--
Pure Personal Opinion | HoffmanLabs LLC

Re: Crash in SYS$FILESCAN if passed string above 0x7fffffff

<207b2b08-f14e-42a3-bd2e-53e9f0acbe04n@googlegroups.com>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=30724&group=comp.os.vms#30724

  copy link   Newsgroups: comp.os.vms
X-Received: by 2002:ac8:70c4:0:b0:412:1bc3:10f3 with SMTP id g4-20020ac870c4000000b004121bc310f3mr132541qtp.13.1698003193141;
Sun, 22 Oct 2023 12:33:13 -0700 (PDT)
X-Received: by 2002:a05:6808:2109:b0:3b2:daf2:7d7b with SMTP id
r9-20020a056808210900b003b2daf27d7bmr2471548oiw.2.1698003192903; Sun, 22 Oct
2023 12:33:12 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border-2.nntp.ord.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.os.vms
Date: Sun, 22 Oct 2023 12:33:12 -0700 (PDT)
In-Reply-To: <cfb6e772-ea48-4eba-a029-e6f9ba94aa19n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2001:9e8:32c4:a900:d4fa:6622:d7df:5e7f;
posting-account=U8VIbwoAAAD-oRYtqvRwM1yjdPKmKsbA
NNTP-Posting-Host: 2001:9e8:32c4:a900:d4fa:6622:d7df:5e7f
References: <cfb6e772-ea48-4eba-a029-e6f9ba94aa19n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <207b2b08-f14e-42a3-bd2e-53e9f0acbe04n@googlegroups.com>
Subject: Re: Crash in SYS$FILESCAN if passed string above 0x7fffffff
From: h47...@gmail.com (hb@end.of.inter.net)
Injection-Date: Sun, 22 Oct 2023 19:33:13 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 20
 by: hb@end.of.inter.net - Sun, 22 Oct 2023 19:33 UTC

On Sunday, October 22, 2023 at 12:32:30 PM UTC+2, Jake Hamby (Solid State Jake) wrote:
....
> It runs properly as is, with C and C++ compilers, but if you modify it slightly to initialize the DESCRIPTOR with a strdup() of the string constant, now it works when compiled with the C compiler, but crashes inside of sys_filescan when compiled with Clang, and indeed, a printf shows the pointer looks like 0000000080076020 with Clang, and a value in P0 space with VSI C.

You are probably aware that if you do a default CC the included string.h selects the 32-bit version of strdup() and if you do a default CXX the included string.h selects the 64-bit version of strdup(). (If you link with /MAP/CROSS you will see that different RTL routines are referenced.) So, strictly speaking, it is not the compiler itself, it is the 32-/64-bit mode it is in. You very likely can get the same crash if you compile CC/POINTER_SIZE=64 and you can avoid the crash with CXX/POINTER_SIZE=32 (or you can use _strdup32(), which is kind of documented, as its prototype can be found in string.h).

As far as I know, SYS$FILESCAN does not accept a 64-bit string descriptor.

Re: Crash in SYS$FILESCAN if passed string above 0x7fffffff

<adfe31f5-5ddc-4112-baf8-7ea714cabe4bn@googlegroups.com>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=30726&group=comp.os.vms#30726

  copy link   Newsgroups: comp.os.vms
X-Received: by 2002:a05:6214:11a3:b0:66d:13ac:275e with SMTP id u3-20020a05621411a300b0066d13ac275emr142620qvv.13.1698004360761;
Sun, 22 Oct 2023 12:52:40 -0700 (PDT)
X-Received: by 2002:a05:6870:15cf:b0:1e9:adc3:c31c with SMTP id
k15-20020a05687015cf00b001e9adc3c31cmr3453426oad.0.1698004360514; Sun, 22 Oct
2023 12:52:40 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.org!3.eu.feeder.erje.net!feeder.erje.net!news2.arglkargh.de!news.mixmin.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.os.vms
Date: Sun, 22 Oct 2023 12:52:40 -0700 (PDT)
In-Reply-To: <207b2b08-f14e-42a3-bd2e-53e9f0acbe04n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:46b0:abc0:a582:7ec:4414:83a8;
posting-account=OGFVHQoAAAASiNAamRQec8BtkuXxYFnQ
NNTP-Posting-Host: 2600:1700:46b0:abc0:a582:7ec:4414:83a8
References: <cfb6e772-ea48-4eba-a029-e6f9ba94aa19n@googlegroups.com> <207b2b08-f14e-42a3-bd2e-53e9f0acbe04n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <adfe31f5-5ddc-4112-baf8-7ea714cabe4bn@googlegroups.com>
Subject: Re: Crash in SYS$FILESCAN if passed string above 0x7fffffff
From: jake.ha...@gmail.com (Jake Hamby (Solid State Jake))
Injection-Date: Sun, 22 Oct 2023 19:52:40 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: Jake Hamby (Solid St - Sun, 22 Oct 2023 19:52 UTC

On Sunday, October 22, 2023 at 12:33:14 PM UTC-7, h47...@gmail.com wrote:
> On Sunday, October 22, 2023 at 12:32:30 PM UTC+2, Jake Hamby (Solid State Jake) wrote:
> ...
> > It runs properly as is, with C and C++ compilers, but if you modify it slightly to initialize the DESCRIPTOR with a strdup() of the string constant, now it works when compiled with the C compiler, but crashes inside of sys_filescan when compiled with Clang, and indeed, a printf shows the pointer looks like 0000000080076020 with Clang, and a value in P0 space with VSI C..
> You are probably aware that if you do a default CC the included string.h selects the 32-bit version of strdup() and if you do a default CXX the included string.h selects the 64-bit version of strdup(). (If you link with /MAP/CROSS you will see that different RTL routines are referenced.) So, strictly speaking, it is not the compiler itself, it is the 32-/64-bit mode it is in. You very likely can get the same crash if you compile CC/POINTER_SIZE=64 and you can avoid the crash with CXX/POINTER_SIZE=32 (or you can use _strdup32(), which is kind of documented, as its prototype can be found in string.h).
>
> As far as I know, SYS$FILESCAN does not accept a 64-bit string descriptor..

It looks like SYS$FILESCAN doesn't accept 64-bit string descriptors or 64-bit item lists, so there's going to be a problem with the return values as well as the input parameter. I wonder how old that code is. Is it written in VAX MACRO, or perhaps BLISS?

Before I went to bed late last night, I thought that the simplest workaround would be to use _malloc32, as Arne suggested, so I added this to the end of my vms/vmsish.h header, which is included by perl.h:

/* Some system services aren't 64-bit pointer clean, like sys$filescan. */
#if __INITIAL_POINTER_SIZE || defined(__clang__)
#define malloc(size) _malloc32(size)
#define calloc(num, size) _calloc32(num, size)
#define realloc(ptr, size) _realloc32(ptr, size)
#endif

The docs say that __INITIAL_POINTER_SIZE is always defined (by default to 0) with VMS compilers, and this header is only included on VMS, so while it looks strange to me not to have an #ifdef __INITIAL_POINTER_SIZE test, I've copied the standard #ifdef check from the VMS header files themselves and if it gives a compiler error, then someone's using a new compiler and this code should probably be revisited.

Thankfully the VMS-specific code in Perl uses a wrapper macro that checks for failed system calls; using 32-bit malloc(), I've gotten a little bit further along, and now I have two new crashes with stack dumps to look at, along with the error codes. Notice the second one is complaining about an argument that isn't 32-bit sign-extended.

MCR Sys$Disk:[]miniperl.exe "-I[.lib]" make_ext.pl "MAKE=MMK" "--nonxs"
%SYSTEM-E-INVARG, invalid argument
%TRACE-E-TRACEBACK, symbolic stack dump follows
image module routine line rel PC abs PC
MINIPERL VMS safe_popen #4243 0000000080172057 0000000080172057
MINIPERL VMS do_spawn2 #11106 0000000080184FFA 0000000080184FFA
MINIPERL VMS Perl_do_aspawn #11031 0000000080184B87 0000000080184B87
MINIPERL PP_SYS Perl_pp_system #4658 000000008029AAC2 000000008029AAC2
MINIPERL RUN Perl_runops_standard #41 0000000000000028 00000000802B4398
MINIPERL PERLMINI S_run_body #2801 000000008011AEB2 000000008011AEB2
MINIPERL PERLMINI perl_run #2716 000000008011A9B8 000000008011A9B8
MINIPERL MINIPERLMAIN main #133 00000000000000DB 00000000800000DB
MINIPERL 0 0000000080000258 0000000080000258
MINIPERL 0 00000000802CDD64 00000000802CDD64
MINIPERL 0 00000000802CE4FD 00000000802CE4FD
PTHREAD$RTL 0 000000008004122C FFFF83000950922C
PTHREAD$RTL 0 0000000080002316 FFFF8300094CA316
0 FFFF8300081FC0A6 FFFF8300081FC0A6
DCL 0 000000008006778B 000000007ADEB78B
%TRACE-I-LINENUMBER, Leading '#' specifies a source file record number.
%TRACE-I-END, end of TRACE stack dump
%SYSTEM-F-ARG_GTR_32_BITS, argument is not 32-bit sign-extended value
%TRACE-F-TRACEBACK, symbolic stack dump follows
image module routine line rel PC abs PC
MINIPERL VMS Perl_cando_by_name_int #12004 0000000080180CF1 0000000080180CF1
MINIPERL VMS find_vmspipe #3800 0000000080194C87 0000000080194C87
MINIPERL VMS safe_popen #4252 0000000080172144 0000000080172144
MINIPERL VMS do_spawn2 #11106 0000000080184FFA 0000000080184FFA
MINIPERL VMS Perl_do_aspawn #11031 0000000080184B87 0000000080184B87
MINIPERL PP_SYS Perl_pp_system #4658 000000008029AAC2 000000008029AAC2
MINIPERL RUN Perl_runops_standard #41 0000000000000028 00000000802B4398
MINIPERL PERLMINI S_run_body #2801 000000008011AEB2 000000008011AEB2
MINIPERL PERLMINI perl_run #2716 000000008011A9B8 000000008011A9B8
MINIPERL MINIPERLMAIN main #133 00000000000000DB 00000000800000DB
MINIPERL 0 0000000080000258 0000000080000258
MINIPERL 0 00000000802CDD64 00000000802CDD64
MINIPERL 0 00000000802CE4FD 00000000802CE4FD
PTHREAD$RTL 0 000000008004122C FFFF83000950922C
PTHREAD$RTL 0 0000000080002316 FFFF8300094CA316
0 FFFF8300081FC0A6 FFFF8300081FC0A6
DCL 0 000000008006778B 000000007ADEB78B
%TRACE-I-LINENUMBER, Leading '#' specifies a source file record number.
%TRACE-I-END, end of TRACE stack dump
Fatal VMS error (status=0x00000FCA) at DKA0:[local.vms-perl5-ptr64-clang]vms.c;1
82, line 4243Fatal VMS error (status=0x000026BC) at DKA0:[local.vms-perl5-ptr64-
clang]vms.c;182, line 12004
%MMK-F-ERRUPD, error status %X100026BC occurred when updating target NONXSEXT

Regards,
Jake Hamby

Re: Crash in SYS$FILESCAN if passed string above 0x7fffffff

<d060de07-b25e-42c2-bbde-48dd7dea316an@googlegroups.com>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=30727&group=comp.os.vms#30727

  copy link   Newsgroups: comp.os.vms
X-Received: by 2002:a05:6214:18f4:b0:66d:365:a767 with SMTP id ep20-20020a05621418f400b0066d0365a767mr128080qvb.8.1698013951462;
Sun, 22 Oct 2023 15:32:31 -0700 (PDT)
X-Received: by 2002:a05:6871:7421:b0:1e9:9202:20cc with SMTP id
nw33-20020a056871742100b001e9920220ccmr3576782oac.0.1698013951167; Sun, 22
Oct 2023 15:32:31 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.os.vms
Date: Sun, 22 Oct 2023 15:32:30 -0700 (PDT)
In-Reply-To: <adfe31f5-5ddc-4112-baf8-7ea714cabe4bn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:46b0:abc0:a582:7ec:4414:83a8;
posting-account=OGFVHQoAAAASiNAamRQec8BtkuXxYFnQ
NNTP-Posting-Host: 2600:1700:46b0:abc0:a582:7ec:4414:83a8
References: <cfb6e772-ea48-4eba-a029-e6f9ba94aa19n@googlegroups.com>
<207b2b08-f14e-42a3-bd2e-53e9f0acbe04n@googlegroups.com> <adfe31f5-5ddc-4112-baf8-7ea714cabe4bn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <d060de07-b25e-42c2-bbde-48dd7dea316an@googlegroups.com>
Subject: Re: Crash in SYS$FILESCAN if passed string above 0x7fffffff
From: jake.ha...@gmail.com (Jake Hamby (Solid State Jake))
Injection-Date: Sun, 22 Oct 2023 22:32:31 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: Jake Hamby (Solid St - Sun, 22 Oct 2023 22:32 UTC

On Sunday, October 22, 2023 at 12:52:42 PM UTC-7, Jake Hamby (Solid State Jake) wrote:
>
> Before I went to bed late last night, I thought that the simplest workaround would be to use _malloc32, as Arne suggested, so I added this to the end of my vms/vmsish.h header, which is included by perl.h:
>
> /* Some system services aren't 64-bit pointer clean, like sys$filescan. */
> #if __INITIAL_POINTER_SIZE || defined(__clang__)
> #define malloc(size) _malloc32(size)
> #define calloc(num, size) _calloc32(num, size)
> #define realloc(ptr, size) _realloc32(ptr, size)
> #endif
>
> The docs say that __INITIAL_POINTER_SIZE is always defined (by default to 0) with VMS compilers, and this header is only included on VMS, so while it looks strange to me not to have an #ifdef __INITIAL_POINTER_SIZE test, I've copied the standard #ifdef check from the VMS header files themselves and if it gives a compiler error, then someone's using a new compiler and this code should probably be revisited.
>
> Thankfully the VMS-specific code in Perl uses a wrapper macro that checks for failed system calls; using 32-bit malloc(), I've gotten a little bit further along, and now I have two new crashes with stack dumps to look at, along with the error codes. Notice the second one is complaining about an argument that isn't 32-bit sign-extended.

The first of the two crashes was fixed by wrapping the definition of struct exit_control_block with "#pragma __required_pointer_size __short" so that it matches what the OS expected.

The second crash is in sys$check_access(). I couldn't figure out what could possibly be going wrong on my end, since all the values I passed were 32-bit. Finally, I tried running the example at Eight-Cubed and it crashes too (with Clang, but not with VSI C).

$ cxx sys_check_access.c
DISK$X86DATA:[home.jhamby.Projects]sys_check_access.c;1:51:33: warning: conversion from string literal to 'char * __ptr32' is deprecated [-Wc++11-compat-deprecated-writable-strings]
static $DESCRIPTOR (filename_d, "SYS$SYSDEVICE:[000000]000000.DIR");
^
1 warning generated.
$ link sys_check_access
$ run sys_check_access
%SYSTEM-F-ARG_GTR_32_BITS, argument is not 32-bit sign-extended value
%TRACE-F-TRACEBACK, symbolic stack dump follows
image module routine line rel PC abs PC
Error: traceback pc= 0000022c was not found
sys_check_access SYS_CHECK_ACCESS 0 000000000000022C 000000008000022C
sys_check_access 0 0000000080000293 0000000080000293
PTHREAD$RTL 0 000000008004122C FFFF83000950922C
PTHREAD$RTL 0 0000000080002316 FFFF8300094CA316
0 FFFF8300081FC0A6 FFFF8300081FC0A6
DCL 0 000000008006778B 000000007ADEB78B
%TRACE-I-END, end of TRACE stack dump
$ cc sys_check_access.c
$ link sys_check_access
$ run sys_check_access
No access to SYSUAF - try running from a privileged account

Finally, I've found an actual OS bug, I think! The previous times have been my own misunderstanding or the system service not supporting 64-bit descriptors and item lists, but here I'm actually seeing a crash with a well-known sample program. BTW, it crashes on clang with "/pointer_size=32" as well.

Regards,
Jake Hamby

Re: Crash in SYS$FILESCAN if passed string above 0x7fffffff

<uh490m$2mm5l$1@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=30728&group=comp.os.vms#30728

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: craigbe...@nospam.mac.com (Craig A. Berry)
Newsgroups: comp.os.vms
Subject: Re: Crash in SYS$FILESCAN if passed string above 0x7fffffff
Date: Sun, 22 Oct 2023 17:51:02 -0500
Organization: A noiseless patient Spider
Lines: 17
Message-ID: <uh490m$2mm5l$1@dont-email.me>
References: <cfb6e772-ea48-4eba-a029-e6f9ba94aa19n@googlegroups.com>
<207b2b08-f14e-42a3-bd2e-53e9f0acbe04n@googlegroups.com>
<adfe31f5-5ddc-4112-baf8-7ea714cabe4bn@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 22 Oct 2023 22:51:02 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="6f5bc7bb77e04089eae0faef7db057f5";
logging-data="2840757"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+tA7UKhqAODuGCMbAG53Dv79JsgA0PwZ0="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:Z33BEpCLN/RSBW6fSri+IqfqOCg=
In-Reply-To: <adfe31f5-5ddc-4112-baf8-7ea714cabe4bn@googlegroups.com>
Content-Language: en-US
 by: Craig A. Berry - Sun, 22 Oct 2023 22:51 UTC

On 10/22/23 2:52 PM, Jake Hamby (Solid State Jake) wrote:

> Before I went to bed late last night, I thought that the simplest
> workaround would be to use _malloc32, as Arne suggested, so I added this
> to the end of my vms/vmsish.h header, which is included by perl.h:
>
> /* Some system services aren't 64-bit pointer clean, like
> sys$filescan. */ > #if __INITIAL_POINTER_SIZE || defined(__clang__)
> #define malloc(size) _malloc32(size)
> #define calloc(num, size) _calloc32(num, size)
> #define realloc(ptr, size) _realloc32(ptr, size)
> #endif

That's almost certainly much too big a hammer. That's going to make all
allocations within the Perl interpreter 32-bit, which likely won't play
nice with the 64-bit pointers you've requested.

Re: Crash in SYS$FILESCAN if passed string above 0x7fffffff

<uh49ra$2mqig$1@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=30729&group=comp.os.vms#30729

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: arn...@vajhoej.dk (Arne Vajhøj)
Newsgroups: comp.os.vms
Subject: Re: Crash in SYS$FILESCAN if passed string above 0x7fffffff
Date: Sun, 22 Oct 2023 19:05:13 -0400
Organization: A noiseless patient Spider
Lines: 27
Message-ID: <uh49ra$2mqig$1@dont-email.me>
References: <cfb6e772-ea48-4eba-a029-e6f9ba94aa19n@googlegroups.com>
<207b2b08-f14e-42a3-bd2e-53e9f0acbe04n@googlegroups.com>
<adfe31f5-5ddc-4112-baf8-7ea714cabe4bn@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 22 Oct 2023 23:05:14 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="090ca90be3c6b5f14178e670212226d3";
logging-data="2845264"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1++KI4CiB6A2b7OeT3Gmn4A5EFpnCjesyE="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:SXF4lS4ST2dUf1VrdtfDQR14w0c=
In-Reply-To: <adfe31f5-5ddc-4112-baf8-7ea714cabe4bn@googlegroups.com>
Content-Language: en-US
 by: Arne Vajhøj - Sun, 22 Oct 2023 23:05 UTC

On 10/22/2023 3:52 PM, Jake Hamby (Solid State Jake) wrote:
> so I added this to the end of my vms/vmsish.h header, which is included by perl.h:
>
> /* Some system services aren't 64-bit pointer clean, like sys$filescan. */
> #if __INITIAL_POINTER_SIZE || defined(__clang__)
> #define malloc(size) _malloc32(size)
> #define calloc(num, size) _calloc32(num, size)
> #define realloc(ptr, size) _realloc32(ptr, size)
> #endif

I am a little curious. What is the goal of this exercise?

If the goal is to make Perl work with 64 bit pointers
and keep all data in P0 space, then it will probably help.

If the goal is allow Perl to work on huge data in P2 space,
then doing all dynamic allocations in P0 space is not the
right solution. Instead you should generally allocated in
P2 space and only allocate in P0 space for those few
data items that has to be used by VMS SYS$ and LIB$
functions only working with such. That will cause some
copying between P0 and P2 space, but that is how the cards
was dealt.

Arne

Re: Crash in SYS$FILESCAN if passed string above 0x7fffffff

<969a0d96-e220-4180-b292-26a9d5c2d1b2n@googlegroups.com>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=30744&group=comp.os.vms#30744

  copy link   Newsgroups: comp.os.vms
X-Received: by 2002:ac8:48d1:0:b0:412:2dd3:e103 with SMTP id l17-20020ac848d1000000b004122dd3e103mr184191qtr.0.1698051758101;
Mon, 23 Oct 2023 02:02:38 -0700 (PDT)
X-Received: by 2002:a05:6870:148d:b0:1e9:8db0:383 with SMTP id
k13-20020a056870148d00b001e98db00383mr4095466oab.1.1698051757905; Mon, 23 Oct
2023 02:02:37 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!peer01.ams1!peer.ams1.xlned.com!news.xlned.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.os.vms
Date: Mon, 23 Oct 2023 02:02:37 -0700 (PDT)
In-Reply-To: <d060de07-b25e-42c2-bbde-48dd7dea316an@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2001:9e8:32d0:2600:4f33:f774:37f9:9a8;
posting-account=U8VIbwoAAAD-oRYtqvRwM1yjdPKmKsbA
NNTP-Posting-Host: 2001:9e8:32d0:2600:4f33:f774:37f9:9a8
References: <cfb6e772-ea48-4eba-a029-e6f9ba94aa19n@googlegroups.com>
<207b2b08-f14e-42a3-bd2e-53e9f0acbe04n@googlegroups.com> <adfe31f5-5ddc-4112-baf8-7ea714cabe4bn@googlegroups.com>
<d060de07-b25e-42c2-bbde-48dd7dea316an@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <969a0d96-e220-4180-b292-26a9d5c2d1b2n@googlegroups.com>
Subject: Re: Crash in SYS$FILESCAN if passed string above 0x7fffffff
From: h47...@gmail.com (hb@end.of.inter.net)
Injection-Date: Mon, 23 Oct 2023 09:02:38 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 3108
 by: hb@end.of.inter.net - Mon, 23 Oct 2023 09:02 UTC

On Monday, October 23, 2023 at 12:32:33 AM UTC+2, Jake Hamby (Solid State Jake) wrote:
> On Sunday, October 22, 2023 at 12:52:42 PM UTC-7, Jake Hamby (Solid State Jake) wrote:
....
> The second crash is in sys$check_access(). I couldn't figure out what could possibly be going wrong on my end, since all the values I passed were 32-bit. Finally, I tried running the example at Eight-Cubed and it crashes too (with Clang, but not with VSI C).
>
> $ cxx sys_check_access.c
> DISK$X86DATA:[home.jhamby.Projects]sys_check_access.c;1:51:33: warning: conversion from string literal to 'char * __ptr32' is deprecated [-Wc++11-compat-deprecated-writable-strings]
> static $DESCRIPTOR (filename_d, "SYS$SYSDEVICE:[000000]000000.DIR");
> ^
> 1 warning generated.
> $ link sys_check_access
> $ run sys_check_access
> %SYSTEM-F-ARG_GTR_32_BITS, argument is not 32-bit sign-extended value
> %TRACE-F-TRACEBACK, symbolic stack dump follows
....
> Finally, I've found an actual OS bug, I think! The previous times have been my own misunderstanding or the system service not supporting 64-bit descriptors and item lists, but here I'm actually seeing a crash with a well-known sample program. BTW, it crashes on clang with "/pointer_size=32" as well.

Looks like a CXX compiler bug, not an OS bug. In the debugger, if you step through the code you will notice that the arguments for sys$check_access() aren't right. (OK, you need to know the VMS/x86 calling standard, the x86_86 instructions and ...)

Re: Crash in SYS$FILESCAN if passed string above 0x7fffffff

<uh5qlm$354r1$1@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=30763&group=comp.os.vms#30763

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!news.furie.org.uk!usenet.goja.nl.eu.org!3.eu.feeder.erje.net!feeder.erje.net!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: club...@remove_me.eisner.decus.org-Earth.UFP (Simon Clubley)
Newsgroups: comp.os.vms
Subject: Re: Crash in SYS$FILESCAN if passed string above 0x7fffffff
Date: Mon, 23 Oct 2023 12:58:30 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 47
Message-ID: <uh5qlm$354r1$1@dont-email.me>
References: <cfb6e772-ea48-4eba-a029-e6f9ba94aa19n@googlegroups.com> <uh36h0$2e63d$2@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 23 Oct 2023 12:58:30 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="c0b89ecb85b64c7a76d8508527fb676f";
logging-data="3314529"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/iivyt5UojqR9zvzx+QbsoGKfQZwchiKQ="
User-Agent: slrn/0.9.8.1 (VMS/Multinet)
Cancel-Lock: sha1:EwyV1sQK4+6uj9FEv14NJw0hOeg=
 by: Simon Clubley - Mon, 23 Oct 2023 12:58 UTC

On 2023-10-22, Arne Vajhøj <arne@vajhoej.dk> wrote:
>
> If SYS$FILESCAN only accept 32 bit pointers then the data
> need to be in P0 or P1 space. P2 space does not work.
>
> The documentation for SYS$FILESCAN does not mention anything
> about 64 bit - I guess that means it does not support
> 64 bit pointers.
>
> Either use another function that supports 64 bit pointers
> or copy to a temporary area in P0 space. You can use
> _malloc32 to allocate there.
>

Even if it's a user error on the part of Jake, it is still really
a documentation error in the VMS documentation.

The documentation should not talk about 64-bit pointers as if they
are something special. The assumption should be that 64-bit pointers
are valid, and if a specific system service doesn't support them, the
following should be written in the documentation for the system service:

NOTE: this system service supports 32-bit addresses only.

The same comments apply to the RMS documentation as well.

This concept of parts of the user's address space being unavailable
to normal system services is utterly alien to people coming from other
operating systems (and does not paint VMS in a good light to put it
mildly).

As such, the normal expectations elsewhere should be the expectations in
the VMS documentation, and the documentation should draw _explicit_
attention to the cases when that is not the situation.

BTW, the _only_ time I can recall seeing address space addressing being
an issue on Linux is with some hardware devices, and hence the use of
bounce buffers in the device driver to isolate that issue from user space
and the rest of the kernel.

I have _never_ seen the issues discussed here in any Linux code I write.

Simon.

--
Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP
Walking destinations on a map are further away than they appear.

Re: Crash in SYS$FILESCAN if passed string above 0x7fffffff

<uh5sj5$35lu7$1@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=30770&group=comp.os.vms#30770

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: arn...@vajhoej.dk (Arne Vajhøj)
Newsgroups: comp.os.vms
Subject: Re: Crash in SYS$FILESCAN if passed string above 0x7fffffff
Date: Mon, 23 Oct 2023 09:31:15 -0400
Organization: A noiseless patient Spider
Lines: 57
Message-ID: <uh5sj5$35lu7$1@dont-email.me>
References: <cfb6e772-ea48-4eba-a029-e6f9ba94aa19n@googlegroups.com>
<uh36h0$2e63d$2@dont-email.me> <uh5qlm$354r1$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 23 Oct 2023 13:31:17 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="090ca90be3c6b5f14178e670212226d3";
logging-data="3332039"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19tH0JSlRGWdqbNy8DUhykc1YTuYp/Kf10="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:udoc7P6boahAeO7IQhLEpKODsKU=
Content-Language: en-US
In-Reply-To: <uh5qlm$354r1$1@dont-email.me>
 by: Arne Vajhøj - Mon, 23 Oct 2023 13:31 UTC

On 10/23/2023 8:58 AM, Simon Clubley wrote:
> On 2023-10-22, Arne Vajhøj <arne@vajhoej.dk> wrote:
>> If SYS$FILESCAN only accept 32 bit pointers then the data
>> need to be in P0 or P1 space. P2 space does not work.
>>
>> The documentation for SYS$FILESCAN does not mention anything
>> about 64 bit - I guess that means it does not support
>> 64 bit pointers.
>>
>> Either use another function that supports 64 bit pointers
>> or copy to a temporary area in P0 space. You can use
>> _malloc32 to allocate there.
>>
>
> Even if it's a user error on the part of Jake, it is still really
> a documentation error in the VMS documentation.
>
> The documentation should not talk about 64-bit pointers as if they
> are something special. The assumption should be that 64-bit pointers
> are valid, and if a specific system service doesn't support them, the
> following should be written in the documentation for the system service:
>
> NOTE: this system service supports 32-bit addresses only.
>
> The same comments apply to the RMS documentation as well.
>
> This concept of parts of the user's address space being unavailable
> to normal system services is utterly alien to people coming from other
> operating systems (and does not paint VMS in a good light to put it
> mildly).
>
> As such, the normal expectations elsewhere should be the expectations in
> the VMS documentation, and the documentation should draw _explicit_
> attention to the cases when that is not the situation.

In this specific case we really need SYS$FILESCAN64 to avoid a
temporary copy.

There is usually always room for improvements of documentation.

As David pointed out the documentation does show the "component
address" being written in a field with bits 0..31.

If VSI were to change documentation broadly then I would
suggest dropping the default assumption and always make a
note: a label "32 bit addresses only" / "64 bit addresses only" /
"Both 32 and 64 bit addresses" / "It is complicated - read
description for each argument carefully". Or something along those
lines.

Yes - the design is a bit tricky. DEC made some decisions
3 decades ago that made VAX -> Alpha migration easier. Today
we pay the price.

Arne

Re: Crash in SYS$FILESCAN if passed string above 0x7fffffff

<2cf2f483-85c1-4832-bc49-44f411051426n@googlegroups.com>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=30791&group=comp.os.vms#30791

  copy link   Newsgroups: comp.os.vms
X-Received: by 2002:ac8:618c:0:b0:412:31bf:105 with SMTP id kq12-20020ac8618c000000b0041231bf0105mr170865qtb.3.1698083035863;
Mon, 23 Oct 2023 10:43:55 -0700 (PDT)
X-Received: by 2002:a05:6808:1985:b0:3ab:84f0:b4a5 with SMTP id
bj5-20020a056808198500b003ab84f0b4a5mr3758861oib.3.1698083035636; Mon, 23 Oct
2023 10:43:55 -0700 (PDT)
Path: i2pn2.org!rocksolid2!news.neodome.net!weretis.net!feeder8.news.weretis.net!3.eu.feeder.erje.net!1.us.feeder.erje.net!feeder.erje.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.os.vms
Date: Mon, 23 Oct 2023 10:43:55 -0700 (PDT)
In-Reply-To: <969a0d96-e220-4180-b292-26a9d5c2d1b2n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:46b0:abc0:943e:8f9a:2d5b:7d8f;
posting-account=OGFVHQoAAAASiNAamRQec8BtkuXxYFnQ
NNTP-Posting-Host: 2600:1700:46b0:abc0:943e:8f9a:2d5b:7d8f
References: <cfb6e772-ea48-4eba-a029-e6f9ba94aa19n@googlegroups.com>
<207b2b08-f14e-42a3-bd2e-53e9f0acbe04n@googlegroups.com> <adfe31f5-5ddc-4112-baf8-7ea714cabe4bn@googlegroups.com>
<d060de07-b25e-42c2-bbde-48dd7dea316an@googlegroups.com> <969a0d96-e220-4180-b292-26a9d5c2d1b2n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <2cf2f483-85c1-4832-bc49-44f411051426n@googlegroups.com>
Subject: Re: Crash in SYS$FILESCAN if passed string above 0x7fffffff
From: jake.ha...@gmail.com (Jake Hamby (Solid State Jake))
Injection-Date: Mon, 23 Oct 2023 17:43:55 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 2829
 by: Jake Hamby (Solid St - Mon, 23 Oct 2023 17:43 UTC

On Monday, October 23, 2023 at 2:02:39 AM UTC-7, h47...@gmail.com wrote:
> On Monday, October 23, 2023 at 12:32:33 AM UTC+2, Jake Hamby (Solid State Jake) wrote:
> > Finally, I've found an actual OS bug, I think! The previous times have been my own misunderstanding or the system service not supporting 64-bit descriptors and item lists, but here I'm actually seeing a crash with a well-known sample program. BTW, it crashes on clang with "/pointer_size=32" as well.
> Looks like a CXX compiler bug, not an OS bug. In the debugger, if you step through the code you will notice that the arguments for sys$check_access() aren't right. (OK, you need to know the VMS/x86 calling standard, the x86_86 instructions and ...)

I should have guessed the problem was in the compiler, not the OS.

Another bug I discovered in testing with Clang is there's no way for me to get the VMS behavior of exit() and _exit(). Instead, Clang/CXX always returns the status after POSIX conversion, even though _POSIX_EXIT isn't defined.. I know the CXX release notes say /MAIN isn't supported, but I didn't expect the behavior to default to UNIX-style. It looks like I'll have to call SYS$EXIT if I need to return a VMS status value, as Perl wants to be able to do.

Regards,
Jake

Re: Crash in SYS$FILESCAN if passed string above 0x7fffffff

<1e502db3-8054-4a38-bccb-51433081ea7dn@googlegroups.com>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=30792&group=comp.os.vms#30792

  copy link   Newsgroups: comp.os.vms
X-Received: by 2002:a05:6214:7f4:b0:66d:2e26:fa9a with SMTP id bp20-20020a05621407f400b0066d2e26fa9amr167290qvb.5.1698084061591;
Mon, 23 Oct 2023 11:01:01 -0700 (PDT)
X-Received: by 2002:a05:6808:f0e:b0:3b2:f5ae:d197 with SMTP id
m14-20020a0568080f0e00b003b2f5aed197mr3894601oiw.11.1698084061409; Mon, 23
Oct 2023 11:01:01 -0700 (PDT)
Path: i2pn2.org!i2pn.org!news.chmurka.net!weretis.net!feeder6.news.weretis.net!border-2.nntp.ord.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.os.vms
Date: Mon, 23 Oct 2023 11:01:00 -0700 (PDT)
In-Reply-To: <uh49ra$2mqig$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:46b0:abc0:943e:8f9a:2d5b:7d8f;
posting-account=OGFVHQoAAAASiNAamRQec8BtkuXxYFnQ
NNTP-Posting-Host: 2600:1700:46b0:abc0:943e:8f9a:2d5b:7d8f
References: <cfb6e772-ea48-4eba-a029-e6f9ba94aa19n@googlegroups.com>
<207b2b08-f14e-42a3-bd2e-53e9f0acbe04n@googlegroups.com> <adfe31f5-5ddc-4112-baf8-7ea714cabe4bn@googlegroups.com>
<uh49ra$2mqig$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <1e502db3-8054-4a38-bccb-51433081ea7dn@googlegroups.com>
Subject: Re: Crash in SYS$FILESCAN if passed string above 0x7fffffff
From: jake.ha...@gmail.com (Jake Hamby (Solid State Jake))
Injection-Date: Mon, 23 Oct 2023 18:01:01 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 61
 by: Jake Hamby (Solid St - Mon, 23 Oct 2023 18:01 UTC

On Sunday, October 22, 2023 at 4:05:18 PM UTC-7, Arne Vajhøj wrote:
> On 10/22/2023 3:52 PM, Jake Hamby (Solid State Jake) wrote:
> I am a little curious. What is the goal of this exercise?
>
> If the goal is to make Perl work with 64 bit pointers
> and keep all data in P0 space, then it will probably help.
>
> If the goal is allow Perl to work on huge data in P2 space,
> then doing all dynamic allocations in P0 space is not the
> right solution. Instead you should generally allocated in
> P2 space and only allocate in P0 space for those few
> data items that has to be used by VMS SYS$ and LIB$
> functions only working with such. That will cause some
> copying between P0 and P2 space, but that is how the cards
> was dealt.

That's a great question! I should retrace my steps to explain how I got here. My original goals were to fix unit test failures in Perl, to use the latest features of the OS where available, and to compile Perl using Clang to take advantage of hopefully improved performance and C++'s stronger type checking.

I knew there was some support for building Perl with CXX on Alpha/Itanium, but not how up-to-date it is. I also know that switching to Clang would expose a lot of bugs in the new toolchain, which indeed it's been doing.

Your analysis of the memory spaces is correct. There's no practical reason why Perl needs to be compiled with 64-bit pointers. I can't think of a use case where a Perl script would ever need that much address space (if it did, you should almost certainly be using a faster programming language).

The original reason I went down the 64-bit pointer route was because I knew that I'd have to use va_list / va_copy on x86, and when I tried building with Clang, it defaults to 64-bit pointers and LP64 types, so I wanted to see if the new ABI is more portable than the old Alpha/IA64 "64-bit-pointers with 32-bit size_t and long" ABI, which it appears to be. More importantly, when I tried using 32-bit pointers with Clang, with NEED_VA_COPY defined in config.h, I got a build error about mismatched pointer types that I couldn't work around (when attempting to pass a va_list * to another function for processing).

My current status is working to bundle up my tiny (1-3 line) bug fixes to submit as individual pull requests. I'm pleasantly surprised to see that the Perl GitHub repo imported changelogs going back 25+ years, so when you look at the "blame" view of e.g. the VMS files, there are patches from last week mixed with code last updated 23-27 years ago. When I submitted my first PR, with a few cosmetic fixes, to get practice with the process, one of the check-in workflows complained that I should add my name and email to a ".mailmap" file, and it found my current email, presumably from my git config, but also an email address I haven't used in 25 years for an ISP that no longer exists. Amazing.

I think the quickest path to being able to build Perl on VMS x86-64 using Clang would be to use 32-bit pointers, get va_copy/va_list fully working in that mode, and fix any other compiler-specific gotchas, of which I've run into two: the sys$check_access() crash, and exit() / _exit() always have POSIX behavior (conversion of the exit status into VMS form), even without /main=posix_exit and without _POSIX_EXIT being defined.

Regards,
Jake

Re: Crash in SYS$FILESCAN if passed string above 0x7fffffff

<18c16149-9bf6-4d6f-8df1-be1fa44b3da6n@googlegroups.com>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=30794&group=comp.os.vms#30794

  copy link   Newsgroups: comp.os.vms
X-Received: by 2002:a05:620a:5629:b0:774:1c2f:ac3e with SMTP id vv9-20020a05620a562900b007741c2fac3emr148885qkn.9.1698085003469; Mon, 23 Oct 2023 11:16:43 -0700 (PDT)
X-Received: by 2002:a05:6808:358f:b0:3af:75e6:efa8 with SMTP id cp15-20020a056808358f00b003af75e6efa8mr3417380oib.6.1698085003295; Mon, 23 Oct 2023 11:16:43 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!feeder.usenetexpress.com!tr1.iad1.usenetexpress.com!69.80.99.14.MISMATCH!border-1.nntp.ord.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.os.vms
Date: Mon, 23 Oct 2023 11:16:42 -0700 (PDT)
In-Reply-To: <1e502db3-8054-4a38-bccb-51433081ea7dn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:46b0:abc0:943e:8f9a:2d5b:7d8f; posting-account=OGFVHQoAAAASiNAamRQec8BtkuXxYFnQ
NNTP-Posting-Host: 2600:1700:46b0:abc0:943e:8f9a:2d5b:7d8f
References: <cfb6e772-ea48-4eba-a029-e6f9ba94aa19n@googlegroups.com> <207b2b08-f14e-42a3-bd2e-53e9f0acbe04n@googlegroups.com> <adfe31f5-5ddc-4112-baf8-7ea714cabe4bn@googlegroups.com> <uh49ra$2mqig$1@dont-email.me> <1e502db3-8054-4a38-bccb-51433081ea7dn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <18c16149-9bf6-4d6f-8df1-be1fa44b3da6n@googlegroups.com>
Subject: Re: Crash in SYS$FILESCAN if passed string above 0x7fffffff
From: jake.ha...@gmail.com (Jake Hamby (Solid State Jake))
Injection-Date: Mon, 23 Oct 2023 18:16:43 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 50
 by: Jake Hamby (Solid St - Mon, 23 Oct 2023 18:16 UTC

On Monday, October 23, 2023 at 11:01:03 AM UTC-7, Jake Hamby (Solid State Jake) wrote:
>
> I think the quickest path to being able to build Perl on VMS x86-64 using Clang would be to use 32-bit pointers, get va_copy/va_list fully working in that mode, and fix any other compiler-specific gotchas, of which I've run into two: the sys$check_access() crash, and exit() / _exit() always have POSIX behavior (conversion of the exit status into VMS form), even without /main=posix_exit and without _POSIX_EXIT being defined.

Here's the error message I can't get past when I try to build Perl using Clang and /Pointer=32:

CXX/NOANSI_ALIAS/NoExceptions/Pointer=32/Opt=(Lev=3)/l_double=64 /Include=[]/Standard=ANSI/Prefix=All/Obj=OP.obj/warn=(disable="c++11-compat-deprecated-writable-strings")/NoList/float=ieee/ieee=denorm/NAMES=(SHORTENED)/Define=(PERL_CORE,_USE_STD_STAT=1) OP.C
op.c:1649:1: warning: non-void function does not return a value in all control paths [-Wreturn-type]
} ^
op.c:1749:1: warning: non-void function does not return a value in all control paths [-Wreturn-type]
} ^
op.c:8117:23: error: first argument to 'va_arg' is of type '__sptr __ptr32 va_list' (aka '__sptr __ptr32 __builtin_va_list') and not 'va_list'
imop = va_arg(*args, OP*);
^~~~~
SYS$COMMON:[SYSLIB]DECC$RTLDEF.TLB;1(STDARG):127:54: note: expanded from macro 'va_arg'
# define va_arg(ap, type) __builtin_va_arg(ap, type)
^~
op.c:8122:21: error: first argument to 'va_arg' is of type '__sptr __ptr32 va_list' (aka '__sptr __ptr32 __builtin_va_list') and not 'va_list'
sv = va_arg(*args, SV*);
^~~~~
SYS$COMMON:[SYSLIB]DECC$RTLDEF.TLB;1(STDARG):127:54: note: expanded from macro 'va_arg'
# define va_arg(ap, type) __builtin_va_arg(ap, type)
^~
op.c:8125:25: error: first argument to 'va_arg' is of type '__sptr __ptr32 va_list' (aka '__sptr __ptr32 __builtin_va_list') and not 'va_list'
sv = va_arg(*args, SV*);
^~~~~
SYS$COMMON:[SYSLIB]DECC$RTLDEF.TLB;1(STDARG):127:54: note: expanded from macro 'va_arg'
# define va_arg(ap, type) __builtin_va_arg(ap, type)
^~
2 warnings and 3 errors generated.
%MMK-F-ERRUPD, error status %X15F61262 occurred when updating target OP.OBJ

Re: Crash in SYS$FILESCAN if passed string above 0x7fffffff

<901b8f9a-6cc3-48a9-8d36-615dd1dc205en@googlegroups.com>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=30820&group=comp.os.vms#30820

  copy link   Newsgroups: comp.os.vms
X-Received: by 2002:ac8:44d7:0:b0:418:fed:c02 with SMTP id b23-20020ac844d7000000b004180fed0c02mr270017qto.8.1698234751891;
Wed, 25 Oct 2023 04:52:31 -0700 (PDT)
X-Received: by 2002:a05:6808:a93:b0:3ac:ac58:59f5 with SMTP id
q19-20020a0568080a9300b003acac5859f5mr5047439oij.8.1698234751683; Wed, 25 Oct
2023 04:52:31 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.os.vms
Date: Wed, 25 Oct 2023 04:52:31 -0700 (PDT)
In-Reply-To: <1e502db3-8054-4a38-bccb-51433081ea7dn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=178.160.248.82; posting-account=FQxqpAoAAABiBvn5gUAg_iKiUcqvwW-l
NNTP-Posting-Host: 178.160.248.82
References: <cfb6e772-ea48-4eba-a029-e6f9ba94aa19n@googlegroups.com>
<207b2b08-f14e-42a3-bd2e-53e9f0acbe04n@googlegroups.com> <adfe31f5-5ddc-4112-baf8-7ea714cabe4bn@googlegroups.com>
<uh49ra$2mqig$1@dont-email.me> <1e502db3-8054-4a38-bccb-51433081ea7dn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <901b8f9a-6cc3-48a9-8d36-615dd1dc205en@googlegroups.com>
Subject: Re: Crash in SYS$FILESCAN if passed string above 0x7fffffff
From: ararmi...@gmail.com (Armine Arabyan)
Injection-Date: Wed, 25 Oct 2023 11:52:31 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 2053
 by: Armine Arabyan - Wed, 25 Oct 2023 11:52 UTC

> I think the quickest path to being able to build Perl on VMS x86-64 using Clang would be to use 32-bit pointers, get va_copy/va_list fully working in that mode, and fix any other compiler-specific gotchas, of which I've run into two: the sys$check_access() crash, and exit() / _exit() always have POSIX behavior (conversion of the exit status into VMS form), even without /main=posix_exit and without _POSIX_EXIT being defined.
>
Hello,
If it is possible to provide reproducers for the issues (for example sys_check_access.c, OP.C), that would be great.
I could add bugs to our bug list and have a look.

Thanks,
Armine

Re: Crash in SYS$FILESCAN if passed string above 0x7fffffff

<a24815ee-6d32-4f5d-833d-f68bd4afcb58n@googlegroups.com>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=30825&group=comp.os.vms#30825

  copy link   Newsgroups: comp.os.vms
X-Received: by 2002:ac8:4559:0:b0:41c:bcfb:27df with SMTP id z25-20020ac84559000000b0041cbcfb27dfmr264444qtn.4.1698264925342;
Wed, 25 Oct 2023 13:15:25 -0700 (PDT)
X-Received: by 2002:a05:6808:3590:b0:3b2:e488:a5d4 with SMTP id
cp16-20020a056808359000b003b2e488a5d4mr5365767oib.9.1698264924999; Wed, 25
Oct 2023 13:15:24 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!feeder1.feed.usenet.farm!feed.usenet.farm!peer01.ams4!peer.am4.highwinds-media.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.os.vms
Date: Wed, 25 Oct 2023 13:15:24 -0700 (PDT)
In-Reply-To: <901b8f9a-6cc3-48a9-8d36-615dd1dc205en@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:46b0:abc0:3dbf:f374:4c93:b12e;
posting-account=OGFVHQoAAAASiNAamRQec8BtkuXxYFnQ
NNTP-Posting-Host: 2600:1700:46b0:abc0:3dbf:f374:4c93:b12e
References: <cfb6e772-ea48-4eba-a029-e6f9ba94aa19n@googlegroups.com>
<207b2b08-f14e-42a3-bd2e-53e9f0acbe04n@googlegroups.com> <adfe31f5-5ddc-4112-baf8-7ea714cabe4bn@googlegroups.com>
<uh49ra$2mqig$1@dont-email.me> <1e502db3-8054-4a38-bccb-51433081ea7dn@googlegroups.com>
<901b8f9a-6cc3-48a9-8d36-615dd1dc205en@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <a24815ee-6d32-4f5d-833d-f68bd4afcb58n@googlegroups.com>
Subject: Re: Crash in SYS$FILESCAN if passed string above 0x7fffffff
From: jake.ha...@gmail.com (Jake Hamby (Solid State Jake))
Injection-Date: Wed, 25 Oct 2023 20:15:25 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 6555
 by: Jake Hamby (Solid St - Wed, 25 Oct 2023 20:15 UTC

On Wednesday, October 25, 2023 at 4:52:33 AM UTC-7, Armine Arabyan wrote:
> > I think the quickest path to being able to build Perl on VMS x86-64 using Clang would be to use 32-bit pointers, get va_copy/va_list fully working in that mode, and fix any other compiler-specific gotchas, of which I've run into two: the sys$check_access() crash, and exit() / _exit() always have POSIX behavior (conversion of the exit status into VMS form), even without /main=posix_exit and without _POSIX_EXIT being defined.
> >
> Hello,
> If it is possible to provide reproducers for the issues (for example sys_check_access.c, OP.C), that would be great.
> I could add bugs to our bug list and have a look.
>
> Thanks,
> Armine

Sure. The sys$check_access crash can be repro'd with the example code at:
https://www.eight-cubed.com/examples/framework.php?file=sys_check_access.c

I can't come up with a shorter repro case, since 90% of the example is boilerplate to set up the data structures. Other than the short "errchk.h" header file that defines a few macros for error checking used by all the examples on that site, it's self-contained. Here's what I see on V9.2-1. Note that the crash when compiled with Clang happens before the privilege check has a chance to fail.

$ cc/version
VSI C X7.4-785 (GEM 50X65) on OpenVMS x86_64 V9.2-1
$ cxx/version
clang version 10.0.1 (git@bitbucket.org:vms_software/llvm-10.0.1.git b2ed69f05fb4239b21b6ff2f806caaf4691c9719)
Build date: 09-19-2023
Target: x86_64-OpenVMS
Thread model: posix
InstalledDir: VMSVM1$DKA0:[SYS0.SYSCOMMON.][SYSEXE]

$ cc sys_check_access
$ link sys_check_access
$ run sys_check_access
No access to SYSUAF - try running from a privileged account

$ cxx sys_check_access.c
DISK$X86DATA:[home.jhamby.Projects]sys_check_access.c;4:51:33: warning: conversion from string literal to 'char * __ptr32' is deprecated [-Wc++11-compat-deprecated-writable-strings]
static $DESCRIPTOR (filename_d, "SYS$SYSDEVICE:[000000]000000.DIR");
^
1 warning generated.
$ link sys_check_access
$ run sys_check_access
%SYSTEM-F-ARG_GTR_32_BITS, argument is not 32-bit sign-extended value
%TRACE-F-TRACEBACK, symbolic stack dump follows
image module routine line rel PC abs PC
Error: traceback pc= 00000220 was not found
sys_check_access SYS_CHECK_ACCESS 0 0000000000000220 0000000080000220
sys_check_access 0 0000000080000283 0000000080000283
PTHREAD$RTL 0 000000008004122C FFFF83000950922C
PTHREAD$RTL 0 0000000080002316 FFFF8300094CA316
0 FFFF8300081FC0A6 FFFF8300081FC0A6
DCL 0 000000008006778B 000000007ADEB78B
%TRACE-I-END, end of TRACE stack dump

The different behavior in _exit() can be shown with a much shorter test program:

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>

int main() {
printf("EXIT_SUCCESS is %d\n", EXIT_SUCCESS);
printf("EXIT_FAILURE is %d\n", EXIT_FAILURE);
#if defined(_POSIX_EXIT)
printf("_POSIX_EXIT is defined\n");
#else
printf("_POSIX_EXIT is not defined\n");
#endif
_exit(123);
}

$ cc test-exit.c
$ link test-exit
$ run test-exit
EXIT_SUCCESS is 0
EXIT_FAILURE is 268435458
_POSIX_EXIT is not defined
$ write sys$output $status
%X0000007B

$ cxx test-exit.c
$ link test-exit
$ run test-exit
EXIT_SUCCESS is 0
EXIT_FAILURE is 268435458
_POSIX_EXIT is not defined
$ write sys$output $status
%X0035A3D9

I just checked to see if the same thing happens with exit() or with returning the exit status from main, and I see that both of those methods behave the same with CC and CXX. It's only _exit() that has the bug of using the POSIX behavior when _POSIX_EXIT is not defined.

The last issue I noted that you may or may not have an open bug for is optarg not linking with CXX in the default 64-bit pointer mode. I can repro this with a do-nothing test program that just accesses optarg:

#include <stdio.h>
#include <stdlib.h>

int main()
{ printf("optarg is %p\n", optarg);
}

$ cc test-getopt.c
$ link test-getopt
$ run test-getopt
optarg is 0
$ cxx test-getopt.c
$ link test-getopt
%ILINK-W-NUDFSYMS, 1 undefined symbol:
%ILINK-I-UDFSYM, decc$ga__optarg64
%ILINK-W-USEUNDEF, undefined symbol decc$ga__optarg64 referenced
section: .text
offset: %X0000000000000012
module: TEST-GETOPT
file: DKA0:[local]test-getopt.OBJ;2
$ cxx/pointer=32 test-getopt.c
$ link test-getopt

As another user noted, this seems to be an issue with the header file not telling Clang that the symbol is there, but uppercase.

Thanks,
Jake Hamby

Re: Crash in SYS$FILESCAN if passed string above 0x7fffffff

<dcc6fae6-4f68-4831-9372-d493e02ecb1en@googlegroups.com>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=30828&group=comp.os.vms#30828

  copy link   Newsgroups: comp.os.vms
X-Received: by 2002:ac8:7198:0:b0:419:a2c6:8210 with SMTP id w24-20020ac87198000000b00419a2c68210mr273119qto.10.1698268418194;
Wed, 25 Oct 2023 14:13:38 -0700 (PDT)
X-Received: by 2002:a05:6830:910:b0:6be:e5f5:a05e with SMTP id
v16-20020a056830091000b006bee5f5a05emr5031633ott.6.1698268417992; Wed, 25 Oct
2023 14:13:37 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!feeder1.feed.usenet.farm!feed.usenet.farm!peer02.ams4!peer.am4.highwinds-media.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.os.vms
Date: Wed, 25 Oct 2023 14:13:37 -0700 (PDT)
In-Reply-To: <a24815ee-6d32-4f5d-833d-f68bd4afcb58n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2001:9e8:32ea:8900:a015:6d0d:c6ae:9281;
posting-account=U8VIbwoAAAD-oRYtqvRwM1yjdPKmKsbA
NNTP-Posting-Host: 2001:9e8:32ea:8900:a015:6d0d:c6ae:9281
References: <cfb6e772-ea48-4eba-a029-e6f9ba94aa19n@googlegroups.com>
<207b2b08-f14e-42a3-bd2e-53e9f0acbe04n@googlegroups.com> <adfe31f5-5ddc-4112-baf8-7ea714cabe4bn@googlegroups.com>
<uh49ra$2mqig$1@dont-email.me> <1e502db3-8054-4a38-bccb-51433081ea7dn@googlegroups.com>
<901b8f9a-6cc3-48a9-8d36-615dd1dc205en@googlegroups.com> <a24815ee-6d32-4f5d-833d-f68bd4afcb58n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <dcc6fae6-4f68-4831-9372-d493e02ecb1en@googlegroups.com>
Subject: Re: Crash in SYS$FILESCAN if passed string above 0x7fffffff
From: h47...@gmail.com (hb@end.of.inter.net)
Injection-Date: Wed, 25 Oct 2023 21:13:38 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 3248
 by: hb@end.of.inter.net - Wed, 25 Oct 2023 21:13 UTC

On Wednesday, October 25, 2023 at 10:15:27 PM UTC+2, Jake Hamby (Solid State Jake) wrote:
....
> The last issue I noted that you may or may not have an open bug for is optarg not linking with CXX in the default 64-bit pointer mode. I can repro this with a do-nothing test program that just accesses optarg:
>
> #include <stdio.h>
> #include <stdlib.h>
>
> int main()
> {
> printf("optarg is %p\n", optarg);
> }
>
> $ cc test-getopt.c
> $ link test-getopt
> $ run test-getopt
> optarg is 0
> $ cxx test-getopt.c
> $ link test-getopt
> %ILINK-W-NUDFSYMS, 1 undefined symbol:
> %ILINK-I-UDFSYM, decc$ga__optarg64
> %ILINK-W-USEUNDEF, undefined symbol decc$ga__optarg64 referenced
> section: .text
> offset: %X0000000000000012
> module: TEST-GETOPT
> file: DKA0:[local]test-getopt.OBJ;2
> $ cxx/pointer=32 test-getopt.c
> $ link test-getopt
>
> As another user noted, this seems to be an issue with the header file not telling Clang that the symbol is there, but uppercase.

It's a bug in the C RTL. As you can find with your favorite tool for displaying the exported, aka universal, symbols in sys$share:decc$shr.exe you will find that there are these optarg related symbols:
DECC$GA_OPTARG, decc$ga_optarg, and DECC$GA__OPTARG64. In other words, decc$ga__optarg64 is missing.

If it were a upcasing-header problem, you could use '/define=("decc$ga_optarg64=DECC$GA__OPTARG64")'. If you try it, you will see it doesn't change anything.

Re: Crash in SYS$FILESCAN if passed string above 0x7fffffff

<6dd6091f-7db1-4c52-8461-5087be3a9d14n@googlegroups.com>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=30831&group=comp.os.vms#30831

  copy link   Newsgroups: comp.os.vms
X-Received: by 2002:a05:6214:440d:b0:66d:101e:9f11 with SMTP id oj13-20020a056214440d00b0066d101e9f11mr312340qvb.8.1698278089819;
Wed, 25 Oct 2023 16:54:49 -0700 (PDT)
X-Received: by 2002:a05:6870:b69e:b0:1e9:9eb6:e11e with SMTP id
cy30-20020a056870b69e00b001e99eb6e11emr8197057oab.3.1698278089544; Wed, 25
Oct 2023 16:54:49 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.os.vms
Date: Wed, 25 Oct 2023 16:54:49 -0700 (PDT)
In-Reply-To: <a24815ee-6d32-4f5d-833d-f68bd4afcb58n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:46b0:abc0:3dbf:f374:4c93:b12e;
posting-account=OGFVHQoAAAASiNAamRQec8BtkuXxYFnQ
NNTP-Posting-Host: 2600:1700:46b0:abc0:3dbf:f374:4c93:b12e
References: <cfb6e772-ea48-4eba-a029-e6f9ba94aa19n@googlegroups.com>
<207b2b08-f14e-42a3-bd2e-53e9f0acbe04n@googlegroups.com> <adfe31f5-5ddc-4112-baf8-7ea714cabe4bn@googlegroups.com>
<uh49ra$2mqig$1@dont-email.me> <1e502db3-8054-4a38-bccb-51433081ea7dn@googlegroups.com>
<901b8f9a-6cc3-48a9-8d36-615dd1dc205en@googlegroups.com> <a24815ee-6d32-4f5d-833d-f68bd4afcb58n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <6dd6091f-7db1-4c52-8461-5087be3a9d14n@googlegroups.com>
Subject: Re: Crash in SYS$FILESCAN if passed string above 0x7fffffff
From: jake.ha...@gmail.com (Jake Hamby (Solid State Jake))
Injection-Date: Wed, 25 Oct 2023 23:54:49 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: Jake Hamby (Solid St - Wed, 25 Oct 2023 23:54 UTC

On Wednesday, October 25, 2023 at 1:15:27 PM UTC-7, Jake Hamby (Solid State Jake) wrote:
> On Wednesday, October 25, 2023 at 4:52:33 AM UTC-7, Armine Arabyan wrote:
> > Hello,
> > If it is possible to provide reproducers for the issues (for example sys_check_access.c, OP.C), that would be great.
> > I could add bugs to our bug list and have a look.
> >
> > Thanks,
> > Armine

Oops, there's one more bug that I ran into that I didn't give a test case for, which is va_list being broken with CXX and 32-bit pointers:

#include <stdio.h>
#include <stdarg.h>

static void test_va_arg_ptr(va_list *args) {
int i;
for (i = 0; i < 3; i++)
printf("args[i]: %d\n", va_arg(*args, int));
}

static void test_va_arg(int arg1, ...) {
printf("arg1 is %d\n", arg1);
va_list args;
va_start(args, arg1);
test_va_arg_ptr(&args);
va_end(args);
}

int main() {
test_va_arg(12, 34, 56, 78);
}

$ cc va_arg_test.c
$ link va_arg_test
$ run va_arg_test
arg1 is 12
args[i]: 34
args[i]: 56
args[i]: 78
$ cxx va_arg_test.c
$ link va_arg_test
$ run va_arg_test
arg1 is 12
args[i]: 34
args[i]: 56
args[i]: 78
$ cxx/pointer=32 va_arg_test.c
DKA0:[local]va_arg_test.c;3:7:40: error: first argument to 'va_arg' is of type '__sptr __ptr32 va_li
st' (aka '__sptr __ptr32 __builtin_va_list') and not 'va_list'
printf("args[i]: %d\n", va_arg(*args, int));
^~~~~
SYS$COMMON:[SYSLIB]DECC$RTLDEF.TLB;1(STDARG):127:54: note: expanded from macro 'va_arg'
# define va_arg(ap, type) __builtin_va_arg(ap, type)
^~
Regards,
Jake Hamby

Re: Crash in SYS$FILESCAN if passed string above 0x7fffffff

<fb536a2e4da035ce2cfc7e1029de8ee9beb72c7b.camel@munted.eu>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=30865&group=comp.os.vms#30865

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: alex.bu...@munted.eu (Single Stage to Orbit)
Newsgroups: comp.os.vms
Subject: Re: Crash in SYS$FILESCAN if passed string above 0x7fffffff
Date: Sat, 28 Oct 2023 19:10:26 +0100
Organization: One very high maintenance cat
Lines: 60
Message-ID: <fb536a2e4da035ce2cfc7e1029de8ee9beb72c7b.camel@munted.eu>
References: <cfb6e772-ea48-4eba-a029-e6f9ba94aa19n@googlegroups.com>
<207b2b08-f14e-42a3-bd2e-53e9f0acbe04n@googlegroups.com>
<adfe31f5-5ddc-4112-baf8-7ea714cabe4bn@googlegroups.com>
<uh49ra$2mqig$1@dont-email.me>
<1e502db3-8054-4a38-bccb-51433081ea7dn@googlegroups.com>
<901b8f9a-6cc3-48a9-8d36-615dd1dc205en@googlegroups.com>
<a24815ee-6d32-4f5d-833d-f68bd4afcb58n@googlegroups.com>
Reply-To: alex.buell@munted.eu
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Injection-Info: dont-email.me; posting-host="8ad7c50fc889f2c95ee70592cf28585d";
logging-data="3644191"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/h6iza7G3dBTsQmSEy19xd35OB9Abqhkk="
User-Agent: Evolution 3.48.4
Cancel-Lock: sha1:/sspUWfVauTsCpUq0T835XMADPA=
In-Reply-To: <a24815ee-6d32-4f5d-833d-f68bd4afcb58n@googlegroups.com>
 by: Single Stage to Orbi - Sat, 28 Oct 2023 18:10 UTC

On Wed, 2023-10-25 at 13:15 -0700, Jake Hamby (Solid State Jake) wrote:
> $ cc  test-exit.c
> $ link test-exit
> $ run test-exit
> EXIT_SUCCESS is 0
> EXIT_FAILURE is 268435458
> _POSIX_EXIT is not defined
> $ write sys$output $status
> %X0000007B
>
> $ cxx test-exit.c
> $ link test-exit
> $ run test-exit
> EXIT_SUCCESS is 0
> EXIT_FAILURE is 268435458
> _POSIX_EXIT is not defined
> $ write sys$output $status
> %X0035A3D9

I just got a chance to test this out on my x86 VMS installation. I get
different results, which is quite worrying.

Alex (KAKAPO) > dir

Directory DKA0:[USERS.ALEX.THINGS]

TEST_EXIT.C;1

Total of 1 file.
Alex (KAKAPO) > cc test_exit
Alex (KAKAPO) > link test_exit
Alex (KAKAPO) > run test_exit
EXIT_SUCCESS is 0
EXIT_FAILURE is 268435458
_POSIX_EXIT is not defined
%SYSTEM-F-DEVOFFLINE, device is not in configuration or not available
Alex (KAKAPO) > write sys$output $status
%X00000084
Alex (KAKAPO) > cxx test_exit.c
Alex (KAKAPO) > link test_exit
Alex (KAKAPO) > run test_exit
EXIT_SUCCESS is 0
EXIT_FAILURE is 268435458
_POSIX_EXIT is not defined
Alex (KAKAPO) > write sys$output $status
%X0035A421

Alex (KAKAPO) > cc/version
VSI C X7.4-785 (GEM 50X65) on OpenVMS x86_64 V9.2-1
Alex (KAKAPO) > cxx/version
clang version 10.0.1 (git@bitbucket.org:vms_software/llvm-10.0.1.git
b2ed69f05fb4239b21b6ff2f806caaf4691c9719)
Build date: 09-19-2023
Target: x86_64-OpenVMS
Thread model: posix
InstalledDir: KAKAPO$DKA0:[SYS0.SYSCOMMON.][SYSEXE]

--
Tactical Nuclear Kittens

Re: Crash in SYS$FILESCAN if passed string above 0x7fffffff

<d2a13add-1d83-4422-b556-7701d53b454en@googlegroups.com>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=30875&group=comp.os.vms#30875

  copy link   Newsgroups: comp.os.vms
X-Received: by 2002:ae9:e110:0:b0:773:a3c1:3216 with SMTP id g16-20020ae9e110000000b00773a3c13216mr121821qkm.0.1698618770897;
Sun, 29 Oct 2023 15:32:50 -0700 (PDT)
X-Received: by 2002:a05:6808:8c:b0:3ad:fc2e:fbc6 with SMTP id
s12-20020a056808008c00b003adfc2efbc6mr2880404oic.10.1698618770719; Sun, 29
Oct 2023 15:32:50 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.os.vms
Date: Sun, 29 Oct 2023 15:32:50 -0700 (PDT)
In-Reply-To: <fb536a2e4da035ce2cfc7e1029de8ee9beb72c7b.camel@munted.eu>
Injection-Info: google-groups.googlegroups.com; posting-host=2001:9e8:32df:1300:29d8:76ac:588:cf89;
posting-account=U8VIbwoAAAD-oRYtqvRwM1yjdPKmKsbA
NNTP-Posting-Host: 2001:9e8:32df:1300:29d8:76ac:588:cf89
References: <cfb6e772-ea48-4eba-a029-e6f9ba94aa19n@googlegroups.com>
<207b2b08-f14e-42a3-bd2e-53e9f0acbe04n@googlegroups.com> <adfe31f5-5ddc-4112-baf8-7ea714cabe4bn@googlegroups.com>
<uh49ra$2mqig$1@dont-email.me> <1e502db3-8054-4a38-bccb-51433081ea7dn@googlegroups.com>
<901b8f9a-6cc3-48a9-8d36-615dd1dc205en@googlegroups.com> <a24815ee-6d32-4f5d-833d-f68bd4afcb58n@googlegroups.com>
<fb536a2e4da035ce2cfc7e1029de8ee9beb72c7b.camel@munted.eu>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <d2a13add-1d83-4422-b556-7701d53b454en@googlegroups.com>
Subject: Re: Crash in SYS$FILESCAN if passed string above 0x7fffffff
From: h47...@gmail.com (hb@end.of.inter.net)
Injection-Date: Sun, 29 Oct 2023 22:32:50 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 3943
 by: hb@end.of.inter.net - Sun, 29 Oct 2023 22:32 UTC

On Saturday, October 28, 2023 at 9:01:32 PM UTC+2, Single Stage to Orbit wrote:
> On Wed, 2023-10-25 at 13:15 -0700, Jake Hamby (Solid State Jake) wrote:
> > $ cc test-exit.c
> > $ link test-exit
> > $ run test-exit
> > EXIT_SUCCESS is 0
> > EXIT_FAILURE is 268435458
> > _POSIX_EXIT is not defined
> > $ write sys$output $status
> > %X0000007B
> >
> > $ cxx test-exit.c
> > $ link test-exit
> > $ run test-exit
> > EXIT_SUCCESS is 0
> > EXIT_FAILURE is 268435458
> > _POSIX_EXIT is not defined
> > $ write sys$output $status
> > %X0035A3D9
> I just got a chance to test this out on my x86 VMS installation. I get
> different results, which is quite worrying.
>
> Alex (KAKAPO) > dir
>
> Directory DKA0:[USERS.ALEX.THINGS]
>
> TEST_EXIT.C;1
>
> Total of 1 file.
> Alex (KAKAPO) > cc test_exit
> Alex (KAKAPO) > link test_exit
> Alex (KAKAPO) > run test_exit
> EXIT_SUCCESS is 0
> EXIT_FAILURE is 268435458
> _POSIX_EXIT is not defined
> %SYSTEM-F-DEVOFFLINE, device is not in configuration or not available
> Alex (KAKAPO) > write sys$output $status
> %X00000084
> Alex (KAKAPO) > cxx test_exit.c
> Alex (KAKAPO) > link test_exit
> Alex (KAKAPO) > run test_exit
> EXIT_SUCCESS is 0
> EXIT_FAILURE is 268435458
> _POSIX_EXIT is not defined
> Alex (KAKAPO) > write sys$output $status
> %X0035A421
>
> Alex (KAKAPO) > cc/version
> VSI C X7.4-785 (GEM 50X65) on OpenVMS x86_64 V9.2-1
> Alex (KAKAPO) > cxx/version
> clang version 10.0.1 (g...@bitbucket.org:vms_software/llvm-10.0.1.git
> b2ed69f05fb4239b21b6ff2f806caaf4691c9719)
> Build date: 09-19-2023
> Target: x86_64-OpenVMS
> Thread model: posix
> InstalledDir: KAKAPO$DKA0:[SYS0.SYSCOMMON.][SYSEXE]
>
> --
> Tactical Nuclear Kittens

Can you show the output of "$ type test_exit.c"?
There is a chance that there is a typo - difference in the exit code:
$ set mess sys$message:DECC$MSG
$ write sys$output f$mess(%x35A421)
%C-S-EXIT132, exit value 132
$ x=132
$ sh symb x
X = 132 Hex = 00000084 Octal = 00000000204
$ write sys$output f$mess(132)
%SYSTEM-F-DEVOFFLINE, device is not in configuration or not available
$

Re: Crash in SYS$FILESCAN if passed string above 0x7fffffff

<a36010b7b69e928c81a48206b3d37585be744304.camel@munted.eu>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=30877&group=comp.os.vms#30877

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: alex.bu...@munted.eu (Single Stage to Orbit)
Newsgroups: comp.os.vms
Subject: Re: Crash in SYS$FILESCAN if passed string above 0x7fffffff
Date: Sun, 29 Oct 2023 23:09:49 +0000
Organization: One very high maintenance cat
Lines: 18
Message-ID: <a36010b7b69e928c81a48206b3d37585be744304.camel@munted.eu>
References: <cfb6e772-ea48-4eba-a029-e6f9ba94aa19n@googlegroups.com>
<207b2b08-f14e-42a3-bd2e-53e9f0acbe04n@googlegroups.com>
<adfe31f5-5ddc-4112-baf8-7ea714cabe4bn@googlegroups.com>
<uh49ra$2mqig$1@dont-email.me>
<1e502db3-8054-4a38-bccb-51433081ea7dn@googlegroups.com>
<901b8f9a-6cc3-48a9-8d36-615dd1dc205en@googlegroups.com>
<a24815ee-6d32-4f5d-833d-f68bd4afcb58n@googlegroups.com>
<fb536a2e4da035ce2cfc7e1029de8ee9beb72c7b.camel@munted.eu>
<d2a13add-1d83-4422-b556-7701d53b454en@googlegroups.com>
Reply-To: alex.buell@munted.eu
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Injection-Info: dont-email.me; posting-host="5f1cc48368681ca65e6a1ec19ab1d231";
logging-data="124783"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19ZowCe6wnNdGI2Q8h1k+1Fh0qP9THtNPs="
User-Agent: Evolution 3.48.4
Cancel-Lock: sha1:1uBwTC6rjw9JIGuIGSkv8Y6ooS0=
In-Reply-To: <d2a13add-1d83-4422-b556-7701d53b454en@googlegroups.com>
 by: Single Stage to Orbi - Sun, 29 Oct 2023 23:09 UTC

On Sun, 2023-10-29 at 15:32 -0700, hb@end.of.inter.net wrote:
> Can you show the output of "$ type test_exit.c"?
> There is a chance that there is a typo - difference in the exit code:
> $ set mess sys$message:DECC$MSG
> $ write sys$output f$mess(%x35A421)
> %C-S-EXIT132, exit value 132
> $ x=132
> $ sh symb x
>   X = 132   Hex = 00000084  Octal = 00000000204
> $ write sys$output f$mess(132)
> %SYSTEM-F-DEVOFFLINE, device is not in configuration or not available
> $

Panic over. I mistyped the exit value as 132 instead of 123. Sorry
about that!
--
Tactical Nuclear Kittens

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor