home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.os.linux.misc      Linux-specific topics not covered by oth      135,536 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 135,252 of 135,536   
   The Natural Philosopher to All   
   Re: Memory Safety (Re: Python: A Little    
   06 Feb 26 10:45:25   
   
   From: tnp@invalid.invalid   
      
   On 06/02/2026 01:51, c186282 wrote:   
   > On 2/5/26 14:27, The Natural Philosopher wrote:   
   >> On 05/02/2026 15:09, Pancho wrote:   
   >>> On 2/5/26 14:14, The Natural Philosopher wrote:   
   >>>   
   >>>> The first is of course implementation specific. C can specify a data   
   >>>> stack separate from a program stack and avoid code corruption,   
   >>>> leaving only data corruption...   
   >>>>   
   >>>   
   >>> Can it?  Naively, I would have thought C was normally built on top of   
   >>> native assembler function calls, which dictates a shared stack.   
   >>> Obviously you could implement a function call independent of   
   >>> assembler, but does anyone, in practice?   
   >>>   
   >> You simply use  a register as a second stack [data] pointer.   
   >>   
   >> Assign all your mem variables on that stack, and increment it at   
   >> function end.   
   >>   
   >> The assembler is trivial. Making C do it that way would not be hard,   
   >> either..   
   >   
   >    I actually searched on that a little, could   
   >    not see any civil way to specify a stack in   
   >    a new segment in 'C'.   
   >   
   Oh sure. You would have to modify the compiler   
      
   But IIRC the first PDP I worked on had 64k data and 64k code in entirely   
   different bits of RAM.   
      
   >    ASM, yea, easier - you have total control (and   
   >    total responsibility).   
   >   
   Of course. That's what it teaches you....   
      
   --   
       "Fanaticism consists in redoubling your effort when you have   
   forgotten your aim."   
      
     George Santayana   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca