HP Forums
I've found a bug in the Prime...possibly serious - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: HP Prime (/forum-5.html)
+--- Thread: I've found a bug in the Prime...possibly serious (/thread-9417.html)



I've found a bug in the Prime...possibly serious - webmasterpdx - 11-02-2017 07:20 AM

I believe I've found a bug in the code. At first, I thought I'd just corrupted my calculator, but I managed to crash the virtual version on the PC too....


Type the following verbatim...

<Home>

S1:="dogs you too cool" if it asks if it can create the variable, hit OK

S1(1,1e9) <Enter>

On my machine, it reboots the calculator. On the PC, it crashes the virtual calculator.

I've done it with just 18 blanks as the string, but I originally found this in CAS mode and it was inconsistent. Certain variable names didn't fail, but just gave me a bad index error.
I think what's happening is it's actually trying to index 1e9 into the string which is a memory leak/intrusion into bad space....which could be a way to get into the system if exploited....if understood :-)

I also found when running this from CAS, I lost some of my history .....sometimes....

The steps above with S1 seem to be the most consistent way to force this failure.

I've gotten it to fail with S1:=" "
However, it doesn't fail with S1:="" (null string).

Can someone at least try this to confirm it.
Thanks
-Donald


RE: I've found a bug in the Prime...possibly serious - Tim Wessman - 11-02-2017 03:01 PM

Thanks!

This was a simple way to try and allocate a ton of memory and this specific case wasn't checking that it hadn't run out after. It would have originally thrown an exception, but since exceptions aren't supported in the prime hardware os... :/


RE: I've found a bug in the Prime...possibly serious - webmasterpdx - 11-03-2017 02:13 AM

Ah, OK...
Well for now, we have a way to reboot from a program :-)


RE: I've found a bug in the Prime...possibly serious - toml_12953 - 11-03-2017 03:12 AM

(11-03-2017 02:13 AM)webmasterpdx Wrote:  Ah, OK...
Well for now, we have a way to reboot from a program :-)

Talk about an eternal optimist! Smile