3
\$\begingroup\$

I'm not sure if this counts as writing malicious code. What does the community think?

\$\endgroup\$
4
  • 2
    \$\begingroup\$ I say no. But I have to go so no good reasons yet \$\endgroup\$
    – user63187
    Feb 18, 2017 at 23:05
  • \$\begingroup\$ I don't have an opinion at present, but it may be worth considering two things: 1. Are the answers likely to be of any use to people with malicious intent? 2. Will the existence of the challenge give people the impression that malicious code requests are acceptable here? \$\endgroup\$ Feb 19, 2017 at 0:36
  • \$\begingroup\$ The original malicious code meta post for reference. (not a duplicate - that one doesn't cover how to draw the line between malicious and not malicious) \$\endgroup\$ Feb 19, 2017 at 0:37
  • \$\begingroup\$ Related \$\endgroup\$
    – mbomb007
    Feb 19, 2017 at 1:24

1 Answer 1

13
\$\begingroup\$

A small, finite memory leak is not malicious

Using up all a computer's memory is a denial of service attack, and thus arguably malicious (although it's something that's easily done by mistake and easily done intentionally, and also has many existing safeguards against it, so PPCG wouldn't really be helping any malware authors there). But that's this question, which is a different question.

Wasting a small amount of a computer's memory in a way that can't be recovered until the program ends is, on most operating systems, entirely harmless, and something that nonmalicious programs do all the time intentionally. (After all, keeping the memory allocated but nonleaked has exactly the same effect on other processes.) It would be potentially problematic on operating systems like DOS, in which a memory leak makes the memory unusable until the system is rebooted (!), but those systems are in the minority nowadays (and DOS users are likely used to rebooting fairly often anyway).

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .