Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Can a buffer overflow ever happen in a Java runtime environment?

 
Luke Murphy
Ranch Hand
Posts: 300
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can a buffer overflow ever happen in a Java runtime environment?
If not, why not?
 
Drago Z Kamenov
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I certainly hope not. This is implemented at the JVM level, so we don't know for sure.
 
Teja Saab
Rancher
Posts: 152
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Luke Murphy wrote:Can a buffer overflow ever happen in a Java runtime environment?
If not, why not?


Of course it can and does happen all the time. Java just gives you the ability to know when such a thing happens by throwing an exception so that you can decide if it is something that you want to handle (for eg. ArrayIndexOutOfBoundsException). The JVM security manager prevents unauthorized memory acess though. However, all bets are off if you use native libraries, but then you could make the argument that it is not really running in a JVM.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic