Hacker News new | ask | show | jobs
by tester756 1344 days ago
"junior"? :P

https://devblogs.microsoft.com/oldnewthing/20180228-00/?p=98...

_________

From: k...@rational.com (Kent Mitchell)

Subject: Re: Does memory leak?

Date: 1995/03/31

Norman H. Cohen (nco...@watson.ibm.com) wrote:

: The only programs I know of with deliberate memory leaks are those whose

: executions are short enough, and whose target machines have enough

: virtual memory space, that running out of memory is not a concern.

: (This class of programs includes many student programming exercises and

: some simple applets and utilities; it includes few if any embedded or

: safety-critical programs.)

This sparked an interesting memory for me. I was once working with a

customer who was producing on-board software for a missile. In my analysis

of the code, I pointed out that they had a number of problems with storage

leaks. Imagine my surprise when the customers chief software engineer said

"Of course it leaks". He went on to point out that they had calculated the

amount of memory the application would leak in the total possible flight time

for the missile and then doubled that number. They added this much

additional memory to the hardware to "support" the leaks. Since the missile

will explode when it hits its target or at the end of its flight, the

ultimate in garbage collection is performed without programmer intervention.

--

Kent Mitchell | One possible reason that things aren't

Technical Consultant | going according to plan is .....

Rational Software Corporation | that there never was a plan!

1 comments

This is why we need a Software Engineering license.

When the point of the product is to kill someone, you can't just stochastically measure shit like this. If the device is ever out of control before it ceases operations, you're looking at Geneva Convention level offenses.

Even software designed to save lives can't get away with this sort of thing.

Teachers have licenses. It does not make them any good at teaching though.
Well no it doesn’t but it does however assure the public that all certified teachers have a duty to care for your children in a safe environment. In which teachers are also duty bound to report anything illegal or potentially harmful as they are liable in court if something does end up happening
Doctors have licences and that doesn't necessarily make them any good at doctoring either, but that doesn't mean you should prefer one without a license.
Bad analogies are bad analogies. A doctor can be a matter of life and death.
>you're looking at Geneva Convention level offenses.

That's a joke. Russia is intentionally bombing Ukrainian civilians, you think they're going to have a single War Crimes charge put against them? How many civilians did the US unintentionally kill across Afghanistan and Iraq, hundreds of thousands? See any charges there either?

Just because charges don't get brought doesn't mean that you didn't commit a crime.

I don't know how I could possibly get one but I'd love to read an independent comparison of this sort of behaviour between US operations and Russian ones. My belief is that the US aims not to kill civilians but is often careless and nets a lot of collateral damage, whereas Russia doesn't care at all and will happily bomb schools if it thinks there's a target in there. But of course I mostly read Western media and writing so my view is potentially very biased.

You've just asserted that it's stochastic with no basis. It could easily be (and in fact is much more likely to be) a periodic operation that leaks memory.

This sort of analysis is completely normal in software. E.g. in safety critical software you often analyse maximum possible stack depth to check that your stack is big enough (one of the reasons why recursive code is sometimes disallowed). This is exactly the same class of analysis.

Isn't the reason for Software to flourish in last 20 years is that we have had no regulation? Adding regulation would then lead to contraction of software industry as we know it. May be the regulation should be not on employees, but the products in categories where they are subjected to life/death situations.

If you think getting a license is the way to fix quality issues, I have a bridge to sell you.

I do wonder what happens if the missile runs out of memory

It just drops?

Presumably undefined unless specifically designed to fail safe but a logical thought would be it keeps burning at present trajectory until it falls and blows up at end of trajectory if device uses an impact fuse. I would be very interested in a more precise answer if you can find one.

https://www.scienceabc.com/innovation/why-do-some-missiles-e...

There's a star trek episode about such a thing, https://memory-alpha.fandom.com/wiki/Warhead_(episode)

Apparently it will "hijack" more memory and attempt to reconstruct it's orders.

But, real world, I would say that data corruption would occur and outside of chemical/physics, it will just drop and lockup.

May have a failsafe to detonate, but that is a fun question indeed.