3 ms·
At least some versions of HP-UX running on the HPPA architecture did the same thing. Writing to a NULL pointer would SIGSEGV, but reading got you a zero. There
by Pinus 2y ago
At least some versions of HP-UX running on the HPPA architecture did the same thing. Writing to a NULL pointer would SIGSEGV, but reading got you a zero. There was a linker flag to turn off this "feature", but when I tried that, I started getting SIGSEGV:s all over various libraries I had no control over...
- AStonesThrow 2y agoIf I recall correctly, we were always careful to allocate memory and assign it to the pointer when creating a new string. But the test for whether a string-typed property existed was just to dereference that pointer. Interestingly, the maintainer had written this as an expansion to an existing codebase, which started on a NeXT and was already handling those NULL pointers properly, so it was a mismatch of coding style; a regression, I suppose. Our next challenge was the database being read entirely into RAM, and as the players expanded the virtual world, the Resident Set Size went out of control and ate all resources on the workstation. Then a fellow came along and wrote a "port concentrator" add-on, because at the time, process limits permitted only 64 open file descriptors, which capped the number of inbound TCP connections for active players. The port concentrator spawned 4 workers and muxed a total of 256 connections, for a pioneering MMORPG environment!