Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is assembly language dangerous? [closed]

Tags:

assembly

Say I write a program in assembler, and I accidentally use some wrong opcode or introduce a bug of some sort.

Would it be possible, since assembly is such a low-level language, that I could accidentally do something destructive?

Or does the operating system (any or all) keep a good level of resource management, sandboxing, etc. that would mitigate this?

like image 780
Casey Chow Avatar asked Sep 13 '25 04:09

Casey Chow


1 Answers

Yes, if you write incorrect code, then bad things can happen. This is true in many languages, even high-level ones (consider System.delete("*.*") in a hypothetical high-level language). But in assembler, it's very easy to make mistakes that are difficult to spot.

like image 197
Oliver Charlesworth Avatar answered Sep 15 '25 00:09

Oliver Charlesworth