One of the typical errors in Java Card applets is using read-only memory for temporary variables that should be in RAM.
These errors can slow down the applet and cause serious problems (for example, Signs of EEPROM corruption ).
Caustic tests are unlikely to reveal these errors. Unit tests access applets as a black box, and all they can do is check the outputs for these inputs. Of course, they can measure time and report suspiciously slow commands, but overwriting one byte in read-only memory takes almost the same time as overwriting one byte in RAM.
Is there any way to get rid of these errors (except to be careful when coding)? Can I somehow detect changes in the EEPROM and how many of them were made when processing a specific APDU?
A good simulator could do the job, of course. However, both JCardSim (www.jcardsim.org) and NXP JCOP Tools seem to be far from reporting usage statistics for EEPROM.
Do you know any other testing tool or method that could help me?
vojta source share