Warning: mysqli::__construct(): (HY000/1203): User howardkn already has more than 'max_user_connections' active connections in D:\Inetpub\vhosts\howardknight.net\al.howardknight.net\includes\artfuncs.php on line 21
Failed to connect to MySQL: (1203) User howardkn already has more than 'max_user_connections' active connectionsPath: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Michael S Newsgroups: comp.lang.c Subject: Re: tcc - first impression. Was: Baby X is bor nagain Date: Wed, 3 Jul 2024 00:42:58 +0300 Organization: A noiseless patient Spider Lines: 75 Message-ID: <20240703004258.0000265e@yahoo.com> References: <20240624160941.0000646a@yahoo.com> <20240624181006.00003b94@yahoo.com> <20240625113616.000075e0@yahoo.com> <87ed8jnbmf.fsf@bsb.me.uk> <867ceadtih.fsf@linuxsc.com> <20240701200924.00003d9a@yahoo.com> <20240702181750.00000590@yahoo.com> <875xtnlshk.fsf@bsb.me.uk> <20240702184518.000057bf@yahoo.com> <87msmzkc1s.fsf@bsb.me.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Injection-Date: Tue, 02 Jul 2024 23:43:02 +0200 (CEST) Injection-Info: dont-email.me; posting-host="eba12ac91f7475b48e41ad15edf35e19"; logging-data="1897130"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+V9Vwp+/IjcWeHZ07jG7Ac54zobzP5nTs=" Cancel-Lock: sha1:L4yFGJdpwUTBvdRw42wOn7emv1M= X-Newsreader: Claws Mail 4.1.1 (GTK 3.24.34; x86_64-w64-mingw32) Bytes: 3772 On Tue, 02 Jul 2024 17:12:47 +0100 Ben Bacarisse wrote: > Michael S writes: > > > On Tue, 02 Jul 2024 16:32:23 +0100 > > Ben Bacarisse wrote: > > > >> Michael S writes: > >> > >> > On Mon, 1 Jul 2024 20:09:24 +0300 > >> > Michael S wrote: > >> > > >> > As far as I am concerned, the most intriguing feature of tcc is > >> > "Memory and Bound checks". Unfortunately, I was not able to make > >> > it work. It keeps telling me "segmentation error" at first > >> > attempt to dereference argv. Is this feature Linux-only or > >> > 32-bit only or some other type of "only" ? > >> > >> The documentation says it should work on x86_64 in Windows. > >> > >> Can you post the code so we can compare. With this little program > >> > >> #include > >> > >> void f(int *a, int n) > >> { > >> printf("a[%d] == %d\n", n, a[n]); > >> } > >> > >> int main(int argc, char **argv) > >> { > >> for (int i = 0; i <= argc; i++) > >> if (argv[i]) > >> printf("argv[%d] == %s\n", i, argv[i]); > >> else printf("argv[%d] is a null pointer\n", i); > >> int a[3]; > >> f(a, 3); > >> } > >> > >> I get this output: > >> > >> $ ./a.out 1 > >> argv[0] == ./a.out > >> argv[1] == 1 > >> argv[2] is a null pointer > >> 004021b9 : at ???: BCHECK: 0x7ffca6719404 is outside of the region > >> t.c:5: by f > >> t.c:15: by main > >> t.c:5: at f: RUNTIME ERROR: invalid memory access > >> t.c:15: by main > >> > > > > I got plain "Segmentation fault". > > > > I it gets me "Segmentation fault" on something as simple as: > > > > #include > > int main(int argc, char **argv) > > { > > printf("%p\n", argv[0]); > > return 0; > > } > > Ah. That looks like a plain "not working" then. (Presumably you get > a reasonable-looking pointer without the -b option). What version of > tcc? > 0.9.27